We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59eb2c7 commit f11a10dCopy full SHA for f11a10d
README.md
@@ -22,7 +22,26 @@ See [eslint-plugin-jsonc] for details.
22
npm i --save-dev jsonc-eslint-parser
23
```
24
25
-## :book: Usage
+## :book: Usage (Flat Config)
26
+
27
+In your ESLint configuration file, set the `parser` property:
28
29
+```js
30
+import jsoncParser from "jsonc-eslint-parser";
31
32
+export default [
33
+ {
34
+ // ...
35
+ // Add the following settings.
36
+ files: ["*.json", "*.json5"], // Specify the extension or pattern you want to parse as JSON.
37
+ languageOptions: {
38
+ parser: jsoncParser, // Set this parser.
39
+ }
40
+ },
41
+];
42
+```
43
44
+## :book: Usage (Legacy Config)
45
46
In your ESLint configuration file, set the `overrides` > `parser` property:
47
0 commit comments