chore(style): modify eslint rules (#1011)

* chore(style): use strict rules

* chore: modify position

* chore(style): warn about `console.log` and `==`

* fix: fix `console.log` error

* Update CropperDiv.js

* Update HomePage.js

Co-authored-by: Yang Luo <hsluoyz@qq.com>
This commit is contained in:
q1anx1
2022-08-13 00:04:18 +08:00
committed by GitHub
parent 6676cc8ff3
commit a741c5179a
5 changed files with 14 additions and 9 deletions

View File

@ -20,7 +20,6 @@
"plugins": ["unused-imports"],
"extends": ["eslint:recommended", "plugin:react/recommended"],
"rules": {
// "eqeqeq": "error",
"semi": ["error", "always"],
"indent": ["error", 2],
// follow antd's style guide
@ -87,15 +86,16 @@
"argsIgnorePattern": "^_"
}
],
"no-unused-vars": "off",
"react/no-deprecated": "error",
"react/jsx-key": "error",
// TODO(qianxi): should be error
"no-console": "error",
"eqeqeq": "warn",
"react/prop-types": "off",
"react/display-name": "off",
"react/react-in-jsx-scope": "off",
// don't use strict mod now, otherwise there are a lot of errors in the codebase
"no-unused-vars": "off",
"react/no-deprecated": "warn",
"no-case-declarations": "off",
"react/jsx-key": "warn"
"no-case-declarations": "off"
}
}