I have just landed a change to how we handle the configuration of
test directories for ESLint.
The big change is that all test directories which need manual ESLint configuration assignment are now listed in the top-level file .eslintrc-test-paths.js. Previously, these would need individual .eslintrc.js files within the test directories.
We've made this change because the previous way causes issues when rolling out new rules for tests. If the test configuration enables a new rule, but we want to disable it for some test directories (e.g. incremental roll-out), the fact the test configuration was applied in the sub-directory would override turning off the rule in the top-level .eslintrc.js file.
It also starts to move us in the direction of a single-top level
configuration, which ESLint
is currently heading towards.
I have considered having this list automatically generated from
the build system/.ini files - maybe as part of running ESlint.
However, that would potentially introduce an expensive build step,
as well as being difficult for editors to handle. We might be able
to do something to update the file in-place, but for now this is
an intermediate step that would make it easier to do in future.