Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ESLint #10

Merged
merged 8 commits into from
Jan 25, 2017
17 changes: 9 additions & 8 deletions gulp/js/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@

/**
* @function `gulp js:lint`
* @desc Lint JavaScript files (using `JSHint`).
* @desc Lint JavaScript files (using `ESLint`).
*/

var gulp = require('gulp');

var taskName = 'js:lint',
taskConfig = {
src: [

// './gulp/**/*.js',
// './helpers/**/*.js',
// './test/**/*.js',
// '!./test/**/expected/**/*.js',
'./source/assets/js/**/*.js',
'./source/modules/**/*.js',
'./source/pages/**/*.js',
'./source/demo/modules/**/*.js',

// './source/demo/modules/!**!/!*.jsx',
'./source/demo/pages/**/*.js',
'!./source/modules/.scaffold/scaffold.js'
],
watch: [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flavaflo, if the task has its own watcher, we should probably remove it as a dependency of the js task: https://github.com/unic/estatico/blob/feature/ESTATICO-170-eslint/gulp/js/default.js#L150 (and add it to build, instead).
Otherwise, every change to a JS file will trigger the linting twice when using --skipWebpackWatch. Once directly and once as a dependency of the js task.

'./source/assets/js/**/*.js',
'./source/modules/**/*.js',
'./source/pages/**/*.js',
'./source/demo/modules/**/*.js',
'./source/demo/pages/**/*.js',
'!./source/modules/.scaffold/scaffold.js'
]
Expand Down