cli
cli copied to clipboard
ESLint plugin not recognising rules matching a folder
What happened?
I received different ESLint results locally and in Code PushUp report.
What would you expect to happen?
I expected the no-magic-numbers
rule to be turned off for the perf
folder in the utils
package.
What steps did you take?
- I added an exception for some ESLint rules in the
perf
folder and added it to the root.eslintrc.json
.
{
"files": ["perf/**/*.ts"],
"rules": {
"no-magic-numbers": "off",
"sonarjs/no-duplicate-string": "off"
}
}
- I checked that ESLint no longer showed warnings e.g. for
no-magic-numbers
in these files. - I ran Code PushUp and displayed the results in portal.
- There I saw these rules being treated as enabled.
What operation system are you on?
Windows
Node version
No response
Relevant log output
No response