Closed jamesrweb closed 2 weeks ago
In ESLint v9, eslint.config.js
is the new default configuration format. JSON config files are not supported by the new config format.
If you still need to use the old (now deprecated) eslintrc config format, you'll have to set environment variable ESLINT_USE_FLAT_CONFIG
to false
.
https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config
Environment
Node version: v21.7.3 npm version: v10.5.0 Local ESLint version: v9.1.1 (Currently used) Global ESLint version: Not found Operating System: darwin 23.4.0
What parser are you using?
Default (Espree)
What did you do?
Configuration
``` { "root": true, "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" ], "rules": { "no-console": 2 } } ```What did you expect to happen?
Ran
pnpm eslint --config "/path/to/my/eslint.config.json" ....
from mylint.sh
bash script.What actually happened?
Link to Minimal Reproducible Example
N / A
Participation
Additional comments
All paths are correct in the
lint.sh
,eslint
has issues with the config json for some reason though. It is not related to a file, a parser or a lint config, simply the CLI itself.