Lintworm
Gulp plugin to lint all kind of files based on keywords.
Usage
Install Lintworm using npm:
npm install lintworm --save-dev
Then use it in your Gulp tasks:
var gulp = ;var lintworm = ; gulp;
Parameter
The following parameter can be passed to the plugin:
strings
The strings to find in the given files.
This can either be flat array of strings or regular expressions:
'TODO' /[Ff]ixme/
or it can be an array of objects:
string: 'TODO' level: 'error' // Override default level for this string file: 'src/*.js' // Specify files to check with this keyword using glob pattern
options
The following options can be passed additionally:
level
The default level of reported findings.
Default value is 'warn'
.
failOnError
Whether the task should fail if at least one finding with error level is found.
Default value is true
.
Full example
The following gulp-task
var gulp = ;var lintworm = ; gulp;
might output this:
/path/to/files/src/index.js (2)
[25] // TODO: A dynamically upper bound is required.
[30] // @ts-ignore
------------------------------------------------------------
Found 1 error and 1 warning.