Make linting great again!

// package.json
...
"scripts": {
"eslint": "eslint *.js"
}
"pre-commit": "eslint"
...

Introducing lint-staged

npm install --save-dev lint-staged pre-commit
// package.json
...
"lint-staged": {
"*.js": "eslint",
"*.css": "stylelint"
}
...
// package.json
...
"scripts" {
"lint-staged": "lint-staged",
"stylelint-staged": "stylelint --syntax scss"
},
"lint-staged": {
"*.js": "eslint",
"*.scss": "stylelint-staged"
},
"pre-commit": "lint-staged"
...

--

--

I help companies build usable products using web-technologies. @reasonconf, @colorsnapper, @reactvienna, @kaffemik. UI/UX, FrontEnd, speaker and 👪 🚵 🏂

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrey Okonetchnikov

Andrey Okonetchnikov

I help companies build usable products using web-technologies. @reasonconf, @colorsnapper, @reactvienna, @kaffemik. UI/UX, FrontEnd, speaker and 👪 🚵 🏂