Javascript .eslint文件的说明

Javascript .eslint文件的说明,javascript,eslint,Javascript,Eslint,在.eslintrc文件中,我有如下内容: "indent": [2, 2, {"SwitchCase": 1}], 我明白。右边的数字2决定了空格 但是,考虑到这一点: "no-alert": 2, "no-else-return": 1, "no-eq-null": 2, "no-eval": 2, "no-extend-native": 2, "no-fallthrough": 2, "no-invalid-this": 2, "no-lone-blocks": 2, "no-l

在.eslintrc文件中,我有如下内容:

"indent": [2, 2, {"SwitchCase": 1}],
我明白。右边的数字2决定了空格

但是,考虑到这一点:

"no-alert": 2,
"no-else-return": 1,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-fallthrough": 2,    
"no-invalid-this": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"keyword-spacing": 2,
"block-scoped-var": 2,
我不明白数字2是什么意思?它不可能是所有的间隔吗

在这种情况下:

"no-compare-neg-zero": "error",
这是不言自明的


我查过了,但找不到合适的解释

它定义了规则的严重性

0 = off, 1 = warning, 2 = error
您可以在此处阅读有关它们的信息: