2018-09-12 17:01:48 +08:00
|
|
|
{
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"es6": true
|
|
|
|
},
|
|
|
|
"extends": [
|
|
|
|
// "plugin:react/recommended",
|
|
|
|
"react-app",
|
|
|
|
"eslint:recommended"
|
|
|
|
],
|
|
|
|
"parser": "babel-eslint",
|
|
|
|
"parserOptions": {
|
|
|
|
"ecmaFeatures": {
|
|
|
|
"experimentalObjectRestSpread": true,
|
|
|
|
"jsx": true
|
|
|
|
},
|
|
|
|
"sourceType": "module"
|
|
|
|
},
|
|
|
|
"plugins": [
|
2018-10-16 18:19:51 +08:00
|
|
|
"react",
|
|
|
|
"jsx-a11y"
|
2018-09-12 17:01:48 +08:00
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"indent": [
|
|
|
|
"warn",
|
2019-01-31 17:37:02 +08:00
|
|
|
2,
|
|
|
|
{ "SwitchCase": 1 }
|
2018-09-12 17:01:48 +08:00
|
|
|
],
|
|
|
|
"linebreak-style": [
|
|
|
|
"warn",
|
|
|
|
"unix"
|
|
|
|
],
|
|
|
|
"quotes": [
|
|
|
|
"warn",
|
|
|
|
"single"
|
|
|
|
],
|
|
|
|
"semi": [
|
|
|
|
"warn",
|
|
|
|
"always"
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
// overwride error to warning
|
|
|
|
"no-case-declarations": "warn",
|
|
|
|
"no-cond-assign": "warn",
|
|
|
|
"no-redeclare": "warn",
|
|
|
|
"no-unreachable": "warn",
|
|
|
|
"no-class-assign": "warn",
|
|
|
|
"no-unused-vars": "warn",
|
|
|
|
"no-irregular-whitespace": "warn",
|
|
|
|
"no-console": "warn",
|
|
|
|
"no-useless-escape": "warn",
|
2018-10-16 18:19:51 +08:00
|
|
|
|
2018-09-12 17:01:48 +08:00
|
|
|
"react/jsx-indent": ["warn", 2],
|
|
|
|
"react/prop-types": "warn",
|
2018-10-16 18:19:51 +08:00
|
|
|
"react/display-name": "warn",
|
|
|
|
|
|
|
|
"jsx-a11y/anchor-has-content": "off",
|
|
|
|
"jsx-a11y/href-no-hash": "off"
|
2018-09-12 17:01:48 +08:00
|
|
|
}
|
|
|
|
}
|