typescript-eslint adds some pre-built configuration files that can be use in the .eslintrc.* config file to extend configuration.
In particular, two files trigger the No rules configured warning: this one and this one.
The first one has rules defined but it's in overrides, which the CLIEngine we are using does not support (See supported features here). Important: Though CLIEngine does not support the overrides feature for what we want to do (patching it), those rules defined in that file are being taken into account during analyses. I tested it with the prefer-rest-params rule that's not on by default with just the eslint rules.
The second file simply does not have rules because of the way typescript-eslint organizes its files.
Proposed changes
Stop warning for empty config files to avoid confusion (that's the change in this PR). The disadvantage is that we won't be warning any files, but also the warning is not helping right now as it's always being throw.
Throw the warning with the file path and disclaimers saying that if the file comes from an external source or uses overrides you should probably do nothing --> This would be relatively easy to implement, though it may be noisy and users may have a similar estructure where they have config files without rules and that doesn't necessarily mean there's a problem.
Next steps
After settling on a possible solution, applying it to channel/eslint-5, channel/eslint-6 and channel/eslint-7.
CLIEngine is deprecated in favor of using ESLint7 class, so maybe we will have to plan if we want to update the code.
Report: https://codeclimate.atlassian.net/browse/QUA-146
Root causes
channel/eslint-5
we started using typescript-eslint.typescript-eslint
adds some pre-built configuration files that can be use in the.eslintrc.*
config file to extend configuration.No rules configured warning
: this one and this one.overrides
, which theCLIEngine
we are using does not support (See supported features here). Important: ThoughCLIEngine
does not support theoverrides
feature for what we want to do (patching it), those rules defined in that file are being taken into account during analyses. I tested it with the prefer-rest-params rule that's not on by default with just the eslint rules.typescript-eslint
organizes its files.Proposed changes
Next steps
channel/eslint-5
,channel/eslint-6
andchannel/eslint-7
.CLIEngine
is deprecated in favor of usingESLint7
class, so maybe we will have to plan if we want to update the code.