mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Add linting for common files
This commit is contained in:
@@ -10,12 +10,28 @@ gulp.task('lint:server', () => {
|
|||||||
return gulp
|
return gulp
|
||||||
.src([
|
.src([
|
||||||
'./website/src/**/api-v3/**/*.js',
|
'./website/src/**/api-v3/**/*.js',
|
||||||
'./website/src/models/user.js',
|
// Comment these out in develop, uncomment them in api-v3
|
||||||
'./website/src/server.js'
|
// './website/src/models/user.js',
|
||||||
|
// './website/src/server.js'
|
||||||
])
|
])
|
||||||
.pipe(eslint())
|
.pipe(eslint())
|
||||||
.pipe(eslint.format())
|
.pipe(eslint.format())
|
||||||
.pipe(eslint.failAfterError());
|
.pipe(eslint.failAfterError());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('lint', ['lint:server']);
|
gulp.task('lint:common', () => {
|
||||||
|
return gulp
|
||||||
|
.src([
|
||||||
|
'./common/script/**/*.js',
|
||||||
|
// @TODO remove these negations as the files are converted over.
|
||||||
|
'!./common/script/index.js',
|
||||||
|
'!./common/script/content/index.js',
|
||||||
|
'!./common/script/src/**/*.js',
|
||||||
|
'!./common/script/public/**/*.js',
|
||||||
|
])
|
||||||
|
.pipe(eslint())
|
||||||
|
.pipe(eslint.format())
|
||||||
|
.pipe(eslint.failAfterError());
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('lint', ['lint:server', 'lint:common']);
|
||||||
|
|||||||
Reference in New Issue
Block a user