Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('lint', () => {
return (
gulp
.src('src/*.js')
// default: use local linting config
.pipe(eslint())
// format ESLint results and print them to the console
.pipe(eslint.format())
.pipe(eslint.failAfterError())
);
});
gulp.task('lint', function () {
return gulp.src(files.src.concat(files.test))
.pipe(eslint({
// configFile: './.eslintrc',
useEslintrc: true
}))
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
function failOnError() {
return gulp.src(['./src/**/*.js'])
.pipe(eslint(lintOptions))
.pipe(eslint.format())
.pipe(eslint.failOnError().on('error', function(e) {
console.log('jslint error:', e);
process.exit(1);
}));
}
core.gulp.task(TASK, () => {
core.subHeading(TASK, 'Linting JavaScript');
//noinspection JSCheckFunctionSignatures
return core.gulp
.src(core.config.files.js)
.pipe(eslint())
.pipe(eslint.format('stylish', process.stdout))
.pipe(eslint.failAfterError())
.on('error', () => {
process.exit(1);
});
});
gulp.task('eslint', () => {
return gulp.src(config.PATHS.src.js)
.pipe(eslint({
rulePaths: [path.join(__dirname, '../../')]
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('lint', ['build:js'], function () {
return gulp.src(['src/rollup/**/*.js', 'gulpfile.js', 'test/**/*.js', 'docs/docs/examples/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('lint', function () {
return gulp.src([
'**/*.js',
'!fabric-contract-api/node_modules/**',
'!fabric-shim/node_modules/**',
'!test/node_modules/**',
'!**/typescript/*.js',
'!coverage/**',
'!docs/**'
], {
base: path.join(__dirname, '..')
}).pipe(eslint()).pipe(eslint.format()).pipe(eslint.failAfterError());
});
gulp.task('lint', function () {
return gulp.src('./' + pkg.main)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('eslint', () => {
return gulp.src(config.PATHS.src.js)
.pipe(eslint({
rulePaths: [path.join(__dirname, '../../')]
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('lint', ['build:js'], function () {
return gulp.src(['src/rollup/**/*.js', 'gulpfile.js', 'test/**/*.js', 'docs/docs/examples/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});