Closed LatenPath closed 2 months ago
I installed this plugin and it works fine with normal json or jsonc files.
But, The only file that I can't parse is settings.json in VSCode.
No output error from Eslint:
Version: "eslint-plugin-jsonc": "^2.16.0", "jsonc-eslint-parser": "^2.4.0", VSCode: 1.92.1
eslint.config.mjs:
import eslintTS from "typescript-eslint"; import eslintJsonc from "eslint-plugin-jsonc"; import eslintJsoncParser from "jsonc-eslint-parser"; export default eslintTS.config( { "files": [ "**/*.json", "**/*.jsonc" ], "languageOptions": { parser: eslintJsoncParser, }, "plugins": { "jsonc": eslintJsonc, }, } );
User settings.json:
{ // "eslint.enable": true, "eslint.format.enable": true, "eslint.useFlatConfig": true, "eslint.validate": ["javascript", "typescript", "json", "jsonc"], "[json]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.formatOnSave": false, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" } }, "[jsonc]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.formatOnSave": false, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" } }, }
I turned off all other settings to try but it still didn't change anything. I don't know where I went wrong, please help. Thank you all very much.
Because the file is outside of Eslint dir.
I installed this plugin and it works fine with normal json or jsonc files.
But, The only file that I can't parse is settings.json in VSCode.
No output error from Eslint:
Version: "eslint-plugin-jsonc": "^2.16.0", "jsonc-eslint-parser": "^2.4.0", VSCode: 1.92.1
eslint.config.mjs:
User settings.json:
I turned off all other settings to try but it still didn't change anything. I don't know where I went wrong, please help. Thank you all very much.