build: enable eslint, again

This commit is contained in:
EnixCoda 2018-06-17 01:29:22 +08:00
parent 4b95670b5b
commit 1d39da83f4
2 changed files with 20 additions and 6 deletions

View file

@ -1,9 +1,9 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
"es6": true
},
"parserOptions": {
"ecmaFeatures": {
@ -12,15 +12,24 @@
"sourceType": "module"
},
"rules": {
"strict": 0,
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-this-before-super": "error",
"no-undef": "error",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
"react/jsx-uses-vars": 1,
"valid-typeof": "warn",
"babel/new-cap": 1,
"babel/no-invalid-this": 1,
"babel/object-curly-spacing": 0,
"babel/quotes": 0,
"babel/semi": 0,
"babel/no-unused-expressions": 1
},
"plugins": [
"class-property"
"babel",
"react"
]
}

View file

@ -19,6 +19,7 @@
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-react-require": "^3.0.0",
"babel-plugin-transform-class-properties": "^6.24.1",
@ -27,6 +28,10 @@
"babel-preset-react": "^6.24.1",
"copy-webpack-plugin": "^4.2.0",
"css-loader": "^0.28.7",
"eslint": "^4.19.1",
"eslint-plugin-babel": "^5.1.0",
"eslint-plugin-class-property": "^1.1.0",
"eslint-plugin-react": "^7.9.1",
"file-loader": "^1.1.5",
"less": "^2.7.3",
"less-loader": "^4.0.5",