mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
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:
@ -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"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user