Hi everyone!
I am trying to check my function nodes code with function-eslint rule in nrlint.
nrlint version - 1.0.2
node-red version - 2.0.6
NodeJS version - 14.17.3
The function-eslint rule configuration is default
{
"env": {
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {}
}
But the default eslint rules from eslint:recommended config are ignored by linter
For example i write the code which will trigger the "for-direction" rule from eslint.
for (var i = 0; i < 10; i--) {
}
and don't get any warning in the linter panel.
Manually specifying the rule in the rules section fixes the problem:
{
"env": {
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"for-direction": "error"
}
}
In this configuration linter works as expected
Running nrlint from console gives the same result.
Minimal flow to reproduce the problem:
[{"id":"d553f0ca4cf61cfb","type":"function","z":"3b054f355f3c4034","name":"","func":"for (var i = 0; i < 10; i--) {}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":280,"wires":[[]]}]
The problem doesn't depend on the rule(tried multiple rules from eslint:recommended config)
Is it possible to not manually specify the default rules in config? Thanks in advance.