Skip to content

Commit 3364f1e

Browse files
authored
Version 0.4.0 (#18)
1 parent e482161 commit 3364f1e

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The rules with the following star :star: are included in the config.
164164
| [jsonc/object-property-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html) | enforce placing object properties on separate lines | :wrench: | | | |
165165
| [jsonc/quote-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html) | require quotes around object literal property names | :wrench: | :star: | :star: | |
166166
| [jsonc/quotes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html) | enforce use of double or single quotes | :wrench: | :star: | :star: | |
167-
| [jsonc/sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html) | require object keys to be sorted | | | | |
167+
| [jsonc/sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html) | require object keys to be sorted | :wrench: | | | |
168168
| [jsonc/space-unary-ops](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html) | disallow spaces after unary operators | :wrench: | :star: | :star: | :star: |
169169

170170
<!--RULES_TABLE_END-->

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Also, [JSONC] and [JSON5], which are variants of [JSON], are more similar to Jav
2929

3030
### How does `eslint-plugin-jsonc` work?
3131

32-
This plugin parses `.json` with its own parser, but this parser just converts AST parsed by `espree` (ESLint standard parser) into AST with another name. However, ASTs that do not exist in [JSON] and JSON-superset syntaxes are reported as parsing errors. By converting the AST to another name, we prevent false positives from ESLint core rules.
32+
This plugin parses `.json` with its own parser, but this parser just converts AST parsed by `espree` (ESLint standard parser) into AST with another name. However, ASTs that do not exist in [JSON] and the superset of JSON syntaxes are reported as parsing errors. By converting the AST to another name, we prevent false positives from ESLint core rules.
3333
Moreover, You can do the same linting using the extended rules of the ESLint core rules provided by this plugin.
3434

3535
## :book: Usage

docs/rules/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ The rules with the following star :star: are included in the `plugin:jsonc/recom
4242
| [jsonc/object-property-newline](./object-property-newline.md) | enforce placing object properties on separate lines | :wrench: | | | |
4343
| [jsonc/quote-props](./quote-props.md) | require quotes around object literal property names | :wrench: | :star: | :star: | |
4444
| [jsonc/quotes](./quotes.md) | enforce use of double or single quotes | :wrench: | :star: | :star: | |
45-
| [jsonc/sort-keys](./sort-keys.md) | require object keys to be sorted | | | | |
45+
| [jsonc/sort-keys](./sort-keys.md) | require object keys to be sorted | :wrench: | | | |
4646
| [jsonc/space-unary-ops](./space-unary-ops.md) | disallow spaces after unary operators | :wrench: | :star: | :star: | :star: |

docs/rules/sort-keys.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ description: "require object keys to be sorted"
88

99
> require object keys to be sorted
1010
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+
1113
## :book: Rule Details
1214

1315
This rule checks all property definitions of object expressions and verifies that all variables are sorted alphabetically.
1416

15-
<eslint-code-block>
17+
<eslint-code-block fix>
1618

1719
```json5
1820
/* eslint jsonc/sort-keys: 'error' */

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-jsonc",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "ESLint plugin for JSON, JSONC and JSON5 files.",
55
"main": "dist/index.js",
66
"typescript": {

0 commit comments

Comments
 (0)