Browse Source

use eslint 'airbnb' preset

eslintAirbnb
Alexander Wunschik 7 years ago
parent
commit
8e4409bded
2 changed files with 9 additions and 21 deletions
  1. +2
    -18
      .eslintrc
  2. +7
    -3
      package.json

+ 2
- 18
.eslintrc View File

@ -1,26 +1,10 @@
{ {
"extends": "airbnb",
"parser": "babel-eslint",
"env": { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"node": true, "node": true,
"mocha": true "mocha": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended",
"rules": {
"complexity": [2, 55],
"max-statements": [2, 115],
"no-console": 0,
"no-empty": 0,
"no-extra-semi": 0,
"no-fallthrough": 0,
"no-inner-declarations": 0,
"no-mixed-spaces-and-tabs": 0,
"no-redeclare": 0,
"no-unreachable": 1,
"no-unused-vars": 0,
} }
} }

+ 7
- 3
package.json View File

@ -25,7 +25,7 @@
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",
"build": "gulp", "build": "gulp",
"lint": "eslint lib",
"lint": "eslint --fix lib",
"watch": "gulp watch", "watch": "gulp watch",
"watch-dev": "gulp watch --bundle" "watch-dev": "gulp watch --bundle"
}, },
@ -41,15 +41,19 @@
"babel-core": "^6.6.5", "babel-core": "^6.6.5",
"babel-eslint": "^7.1.1", "babel-eslint": "^7.1.1",
"babel-loader": "^6.2.4", "babel-loader": "^6.2.4",
"babel-polyfill": "^6.22.0",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.8.0", "babel-plugin-transform-es3-property-literals": "^6.8.0",
"babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-runtime": "^6.22.0",
"babel-polyfill": "^6.22.0",
"babel-preset-es2015": "^6.6.0", "babel-preset-es2015": "^6.6.0",
"babel-runtime": "^6.22.0", "babel-runtime": "^6.22.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"clean-css": "^4.0.2", "clean-css": "^4.0.2",
"eslint": "^3.15.0",
"eslint": "^3.18.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-clean-css": "^2.3.2", "gulp-clean-css": "^2.3.2",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",

Loading…
Cancel
Save