eslint: enforce use of const when variable not modified
This commit is contained in:
10
.eslintrc.js
10
.eslintrc.js
@@ -32,12 +32,17 @@ module.exports = {
|
||||
/** @todo cognitive complexity should be much lower (25-50?) */
|
||||
"sonarjs/cognitive-complexity": [ "warn", 200 ],
|
||||
/** @todo no param reassign creates too many warnings but should be a warning */
|
||||
"comma-dangle": [ "error" ],
|
||||
"no-param-reassign": "off",
|
||||
/** @todo no use before define creates too many warnings but should be a warning */
|
||||
"no-use-before-define": "off",
|
||||
/** @todo camel case creates too many warnings but should be a warning */
|
||||
"camelcase": "off",
|
||||
"comma-dangle": [ "error" ],
|
||||
"node/no-unsupported-features/es-syntax": 0,
|
||||
"no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ],
|
||||
"sonarjs/no-duplicate-string": 0,
|
||||
"semi" : "error",
|
||||
"prefer-const": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"array-bracket-spacing": [ "error", "always" ],
|
||||
"comma-spacing": "error",
|
||||
@@ -85,7 +90,8 @@ module.exports = {
|
||||
{
|
||||
files: [ 'src/editor/locale/*.js' ],
|
||||
rules: { // lang files may have long length
|
||||
"max-len": "off"
|
||||
"max-len": "off",
|
||||
"camelcase": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user