nri*_*ion 6 reactjs eslint react-native standardjs eslintrc
如标题所述,eslint是否有可能在所有规则上显示警告而不是错误?如果该信息相关,我正在使用Standard JS。
谢谢!
Mic*_*Mic 21
遵循es-lint-plugin-prettier readme,编辑您的.eslintrc.json并为以下内容添加特定规则prettier:
"rules": {
// maybe your other rules...
"prettier/prettier": "warn"
}
Run Code Online (Sandbox Code Playgroud)
然后,prettier规则将作为警告而不是错误发出。
不知道的所有的副作用,但它似乎工作确定为我的项目,在这里我也用@typescript-eslint/eslint-plugin,@typescript-eslint/parser,eslint-config-prettier和eslint-plugin-prettier。
如果有帮助,我的extends配置.eslintrc.json:
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
Run Code Online (Sandbox Code Playgroud)
Way*_*rex 10
我认为目前没有开箱即用的选项,但也许您可以使用插件来归档: Eslint插件仅警告
或将所有规则设置为警告而不是错误。
| 归档时间: |
|
| 查看次数: |
3157 次 |
| 最近记录: |