Added lint
This commit is contained in:
parent
4fc4b14fe7
commit
89a480fe55
3 changed files with 29 additions and 7 deletions
|
@ -1,3 +0,0 @@
|
|||
module.exports = {
|
||||
"extends": "airbnb"
|
||||
};
|
22
gulpfile.js
Normal file
22
gulpfile.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const gulp = require('gulp');
|
||||
const eslint = require('gulp-eslint');
|
||||
|
||||
const srcDir = [
|
||||
'src/*.js',
|
||||
'src/**/*.js',
|
||||
];
|
||||
|
||||
function checkSrc() {
|
||||
return gulp.src(srcDir)
|
||||
.pipe(eslint())
|
||||
.pipe(eslint.format())
|
||||
.pipe(eslint.failAfterError());
|
||||
}
|
||||
|
||||
function watchEslint() {
|
||||
gulp.watch(srcDir, checkSrc);
|
||||
}
|
||||
|
||||
gulp.task('check:lint', checkSrc);
|
||||
gulp.task('watch:lint', watchEslint);
|
||||
gulp.task('default', gulp.parallel('watch:lint'));
|
11
package.json
11
package.json
|
@ -5,6 +5,7 @@
|
|||
"homepage": "https://outils.darkou.fr/",
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.1.3",
|
||||
"proptypes": "^1.1.0",
|
||||
"react": "^16.4.1",
|
||||
"react-dom": "^16.4.1",
|
||||
"react-md-file": "^1.1.0",
|
||||
|
@ -20,10 +21,12 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@svgr/cli": "^2.2.0",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.1.1",
|
||||
"eslint-plugin-react": "^7.11.1"
|
||||
"eslint-plugin-import": "^2.18.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"eslint-plugin-react": "^7.14.2",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-eslint": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue