Skip to content

laget-se/eslint-config-lagetse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-lagetse

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

Setup and usage

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());
});

Type-time linting in editors

Sublime

https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c5b48#.vrv9pvsul