Share linter configurations accross projects
Add as npm depency to your project:
{ "linter-conf": "git+ssh://[email protected]/dispojob/linter-conf.git#master" }
Then add a .eslintrc
with extension to one or more configurations:
{
"extends": [
"./node_modules/linter-conf/.eslintrc",
"./node_modules/linter-conf/.eslintrc-es6-features"
],
"env": {
"browser": true
},
"globals": {
},
"rules": {
}
}
You can use the lint-branch script to check if your branch dev is correctly linted: node_modules/linter-conf/bin/lint-branch.sh
To install a pre-push hook to automatically reject your push if it does not meet the standards:
# from the project directory
ln -s $PWD/node_modules/linter-conf/bin/lint-branch.sh .git/hooks/pre-push