We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After updating to prettier 3.2.3, it formats .eslintrc.json with trailing commas, here is an example:
{ "parser": "@typescript-eslint/parser", "extends": ["plugin:@typescript-eslint/recommended", "prettier"], "plugins": ["no-only-tests"], "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", <-- }, "ignorePatterns": ["node_modules/", "build"], "rules": { "no-console": ["off"], "@typescript-eslint/consistent-type-assertions": [ "error", { "assertionStyle": "angle-bracket", <-- }, <-- ], "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-empty-function": "off", "prefer-const": "off", "no-only-tests/no-only-tests": ["error"], <-- }, <-- }
When running eslint 8.56.0, it throw an error Cannot read config file: [foldername]/.eslintrc.json Error: Unexpected token } in JSON at position 210
Cannot read config file: [foldername]/.eslintrc.json Error: Unexpected token } in JSON at position 210
I assume this is related to #15881 , and that it incorrectly identifies which files are json and which jsonc. While eslint config specifies it allows comments, I am not sure it implies it also accepts trailing commas https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats
[Edit]: Here are minimal replication steps:
npm ci
npm run eslint
npm run prettier
The text was updated successfully, but these errors were encountered:
We have the same issue. Please revert #15927 or fix the problem.
Sorry, something went wrong.
Close in favor of #15946
I think you meant #15945
Yes, thank you!
No branches or pull requests
After updating to prettier 3.2.3, it formats .eslintrc.json with trailing commas, here is an example:
When running eslint 8.56.0, it throw an error
Cannot read config file: [foldername]/.eslintrc.json Error: Unexpected token } in JSON at position 210
I assume this is related to #15881 , and that it incorrectly identifies which files are json and which jsonc. While eslint config specifies it allows comments, I am not sure it implies it also accepts trailing commas https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats
[Edit]: Here are minimal replication steps:
npm ci
npm run eslint
(works as exptected)npm run prettier
(changes .eslintrc.json)npm run eslint
(fails with error similar to what was reported above)The text was updated successfully, but these errors were encountered: