README
Fepper client-side JavaScript
ESLint extension forAlso an up-to-date drop-in replacement for gulp-eslint
Given the apparent abandonment of gulp-eslint, this package now supports streaming ESLint through gulp, independent of Fepper.
Both gulp 3 LTS and gulp 4 are supported.
fp-eslint 8 supports ESLint 8.
Use as a drop-in replacement for gulp-eslint:
const {src, task} = require('gulp');
const fpEslint = require('fp-eslint');
task('default', () => {
return src(['scripts/*.js'])
// fpEslint() attaches the lint output to the "eslint" property
// of the file object so it can be used by other modules.
.pipe(fpEslint())
// fpEslint.format() outputs the lint results to the console.
// Alternatively use fpEslint.formatEach().
.pipe(fpEslint.format())
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failAfterError last.
.pipe(fpEslint.failAfterError());
});
Or use the plugin API to do things like:
gulp.src(['**/*.js', '!node_modules/**'])
.pipe(fpEslint({
overrideConfig: {
rules: {
'my-custom-rule': 'warn',
'strict': ['error', 'function']
},
globals: [
'jQuery',
'