add ESLint

ESLint config: https://github.com/airbnb/javascript
This commit is contained in:
winniehell 2016-07-22 22:54:58 +02:00
parent 3d174c7198
commit e5a0d41db0
4 changed files with 42 additions and 0 deletions

4
.eslintignore Normal file
View file

@ -0,0 +1,4 @@
/public/
/tmp/
/vendor/

23
.eslintrc Normal file
View file

@ -0,0 +1,23 @@
{
"extends": "airbnb",
"globals": {
"$": false,
"_": false,
"beforeEach": false,
"d3": false,
"define": false,
"describe": false,
"document": false,
"expect": false,
"fixture": false,
"gl": false,
"it": false,
"jQuery": false,
"Mousetrap": false,
"spyOn": false,
"spyOnEvent": false,
"Turbolinks": false,
"window": false
}
}

1
.gitignore vendored
View file

@ -37,6 +37,7 @@
/doc/code/*
/dump.rdb
/log/*.log*
/node_modules/
/nohup.out
/public/assets/
/public/uploads.*

14
package.json Normal file
View file

@ -0,0 +1,14 @@
{
"private": true,
"scripts": {
"eslint": "eslint .",
"eslint-fix": "eslint --fix ."
},
"devDependencies": {
"eslint": "^3.1.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1"
}
}