A Gulp plugin which allows the users to use Prettier Eslint.
npm install @kasperhesthaven/gulp-prettier-eslint
import prettierEslint from 'gulp-prettier-eslint';
gulp.task('js-lint', () =>
gulp.src('glob.js')
.pipe(prettierEslint({
eslintConfig: {
parserOptions: {
ecmaVersion: 7
}
},
prettierOptions: {
singleQuote: true,
useTabs: true
},
logLevel: 'warn'
}))
);
.pipe(plumber({ errorHandler: (err) => {
console.log(`JS lint error in ${err.message.filePath}`);
console.log(`${err.message.loc.start.line}:${err.message.loc.start.column} ${err.message}`)
}}))