JavaScript linting rules for laget.se.
Extends eslint-config-airbnb
, which in turn makes use of eslint-plugin-react
and eslint-plugin-jsx-a11y
.
To view a full list of all the rules being applied, run:
npm run lint:ls
Install the config:
npm i -D eslint-config-lagetse
Add a .eslintrc
to the project root:
{
"extends": "lagetse"
}
Now go linting!
// package.json
{
"scripts": {
"lint:js": "eslint --ext .js --ext .jsx path/to/src/dir"
}
}
// Using gulp
import eslint from 'gulp-eslint';
gulp.task('lint:js', () => {
gulp.src(['path/to/**/*.js', 'path/to/**/*.jsx'])
.pipe(eslint());
});
https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c5b48#.vrv9pvsul