eslint: enforce use of const when variable not modified

This commit is contained in:
JFH
2021-05-31 00:09:51 +02:00
parent a4ef206050
commit 074df9cdec
16 changed files with 27 additions and 21 deletions

View File

@@ -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"
}
}
]