Will the "eslintConfig"
key in package.json
files still work in ESLint v9?
#18131
-
ContextAs of this writing using ESLint v8.56.0 I use the following configuration in my {
"scripts": {
"lint": "eslint --config ./package.json",
"lint:check": "npm run lint -- ./",
"lint:fix": "npm run lint -- --fix ./"
},
"eslintConfig": {
"extends": "./node_modules/dev-config/lib/eslint.config.js"
}
} Using the Documentation ContradictionsThe reason I'm starting this discussion thread is because while the v8 /docs/latest/use/configure/configuration-files page lists the
QuestionsSo with all of this context presented, my question is:
And as a follow-on question:
{
"eslintConfig": ["./node_modules/dev-config/lib/eslint.config.js"]
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Configuration settings in package.json are not supported in the new config system (the default for v9). I guess the migration guide could be more explicit about that. |
Beta Was this translation helpful? Give feedback.
The main reason for removing the
"eslintConfig"
key lookup was to avoid the complexity of the legacy config system, where many ways existed to do the same thing. This is one of the aims stated in this blog post and is mentioned in the original RFC.Some of the initial decisions in the RFC have been revisited later because they turned out impractical or were posing challenges to the ecosystem, but it looks like this does not apply in your case. So I would not expect the team to consider reinstating support for the
"eslintConfig"
key in package.json files for the advantages you mention.I think the best you could do is adding a eslint.config.js file to the root of your repo where you re-exp…