小编Ale*_*sso的帖子

对于 no-unused-vars,我如何在 ESLint 中获得警告而不是错误?

使用 ESLint 时如何获得警告而不是错误?

我使用6.7.2带有 babel 和 react 插件的ESLint版本。

这是我的实际.eslintrc.json

{
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:react/recommended"
    ],
    "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "rules": {
    },
    "settings": {
        "react" : {
            "version": "16.7.0"
        }
    },
    "parser": "babel-eslint"
}
Run Code Online (Sandbox Code Playgroud)

eslint

8
推荐指数
1
解决办法
2449
查看次数

标签 统计

eslint ×1