mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 15:23:05 +00:00
* repair intent check wraning * change doublequote to singlequote, add semicolon * optimized code * modify type-check wraning
62 lines
1.1 KiB
JSON
62 lines
1.1 KiB
JSON
{
|
|
"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": [
|
|
"react",
|
|
"jsx-a11y"
|
|
],
|
|
"rules": {
|
|
"indent": [
|
|
"warn",
|
|
2,
|
|
{ "SwitchCase": 1 }
|
|
],
|
|
"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",
|
|
|
|
"react/jsx-indent": ["warn", 2],
|
|
"react/prop-types": "warn",
|
|
"react/display-name": "warn",
|
|
|
|
"jsx-a11y/anchor-has-content": "off",
|
|
"jsx-a11y/href-no-hash": "off"
|
|
}
|
|
}
|