yarn
yarn eslint .
With a combination of configurations, some "overrides" are not matched.
The combination of:
root: true
in .eslintrc.js
root: true,
or
- a rule targeting specific files (at the root or in "overrides"):
"no-restricted-imports": [
"error",
{
paths: RESTRICTED_IMPORTS,
},
],
/
{
files: ["*.js"],
parser: "@babel/eslint-parser",
rules: {
"no-restricted-imports": [
"error",
{
paths: RESTRICTED_IMPORTS,
},
],
},
},
AND
- a
.eslintrc.js
file in a subfolder
const { join } = require("path");
module.exports = {
extends: join(__dirname, "../../.eslintrc.js"),
};
=>
Causes other "overrides" rules to not be matched.
In this reproduction, to see the errors reported correctly, we need to either:
- delete
packages/service-web/.eslintrc.js
or - comment
root: true
and rules at the root and in the*.js
overrides