You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,13 @@
16
16
17
17
This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using [JSON], [JSONC] and [JSON5].
18
18
19
-
- You can apply rules similar to the rules you use for JavaScript to JSON using the shareable config `"plugin:jsonc/auto-config"` provided by this plugin.
19
+
- You can use ESLint to lint [JSON].
20
+
- You can apply rules similar to the rules you use for JavaScript to JSON using the [`"jsonc/auto"`](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html) rule provided by this plugin.
20
21
- You can choose the appropriate config provided by this plugin depending on whether you are using [JSON], [JSONC] or [JSON5].
22
+
- Supports [Vue SFC](https://vue-loader.vuejs.org/spec.html) custom blocks such as `<i18n>`.
23
+
Requirements `vue-eslint-parser` v7.3.0 and above.
24
+
- Supports ESLint directives. e.g. `// eslint-disable-next-line`
25
+
- You can check your code in real-time using the ESLint editor integrations.
21
26
22
27
You can check on the [Online DEMO](https://ota-meshi.github.io/eslint-plugin-jsonc/playground/).
|[jsonc/auto](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html)| apply jsonc rules similar to your configured ESLint core rules |:wrench:||||
140
145
|[jsonc/key-name-casing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html)| enforce naming convention to property key names |||||
|[jsonc/valid-json-number](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html)| disallow invalid number for JSON |:wrench:|:star:|:star:||
154
+
|[jsonc/vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html)| disallow parsing errors in Vue custom blocks ||:star:|:star:|:star:|
Copy file name to clipboardExpand all lines: docs/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,12 @@
16
16
17
17
This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using [JSON], [JSONC] and [JSON5].
18
18
19
-
- You can apply rules similar to the rules you use for JavaScript to JSON using the shareable config `"plugin:jsonc/auto-config"` provided by this plugin.
19
+
- You can use ESLint to lint [JSON].
20
+
- You can apply rules similar to the rules you use for JavaScript to JSON using the [`"jsonc/auto"`](./rules/auto.md) rule provided by this plugin.
20
21
- You can choose the appropriate config provided by this plugin depending on whether you are using [JSON], [JSONC] or [JSON5].
22
+
- Supports [Vue SFC](https://vue-loader.vuejs.org/spec.html) custom blocks such as `<i18n>`.
23
+
- Supports ESLint directives. e.g. `// eslint-disable-next-line`
24
+
- You can check your code in real-time using the ESLint editor integrations.
21
25
22
26
You can check on the [Online DEMO](./playground/).
description: "apply jsonc rules similar to your configured ESLint core rules"
6
+
---
7
+
# jsonc/auto
8
+
9
+
> apply jsonc rules similar to your configured ESLint core rules
10
+
11
+
-:wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
12
+
13
+
## :book: Rule Details
14
+
15
+
Automatically apply jsonc rules similar to your configured ESLint core rules to JSON.
16
+
17
+
This rule checks the ESLint core rules you are already using in your configuration and internally turns ON the [Extension Rules](./README.md#extension-rules) provided by this plugin.
18
+
19
+
If you already have the `jsonc/*` rule turned ON, that rule will not apply. Instead, that rule will check your JSON.
20
+
The rules contained in the sharable configuration work as well. If you use the `"plugin:jsonc/recommended-with-json"` configuration, the `auto` rule will not turn ON the `jsonc/comma-dangle` rule even if you were using the `comma-dangle` rule.
description: "disallow parsing errors in Vue custom blocks"
6
+
---
7
+
# jsonc/vue-custom-block/no-parsing-error
8
+
9
+
> disallow parsing errors in Vue custom blocks
10
+
11
+
-:gear: This rule is included in all of `"plugin:jsonc/recommended-with-json"`, `"plugin:jsonc/recommended-with-json5"` and `"plugin:jsonc/recommended-with-jsonc"`.
12
+
13
+
## :book: Rule Details
14
+
15
+
This rule reports JSON parsing errors in Vue custom blocks.
0 commit comments