Skip to content

Commit fcdca99

Browse files
committed
update
1 parent 9041ce1 commit fcdca99

36 files changed

+152
-53
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/coverage
33
/node_modules
44
/tests/fixtures/integrations
5+
/tests/fixtures/**/*.vue
6+
/tests/fixtures/**/*.json
57
/assets
68
/dist
79
/docs/.vuepress/dist

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ module.exports = {
1212
"plugin:@ota-meshi/+typescript",
1313
"plugin:@ota-meshi/+eslint-plugin",
1414
"plugin:@ota-meshi/+vue2",
15+
"plugin:@ota-meshi/+json",
16+
"plugin:@ota-meshi/+yaml",
17+
"plugin:@ota-meshi/+md",
1518
"plugin:@ota-meshi/+prettier",
16-
// "plugin:@ota-meshi/+json",
1719
],
1820
rules: {
1921
"require-jsdoc": "error",

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"javascript",
44
"javascriptreact",
55
"vue",
6-
"typescript"
6+
"typescript",
7+
"jsonc",
8+
"json",
9+
"markdown"
710
],
811
"typescript.validate.enable": true,
912
"javascript.validate.enable": false,

docs/rules/array-bracket-newline.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This rule enforces line breaks after opening and before closing array brackets.
1616

1717
<eslint-code-block fix>
1818

19+
<!-- eslint-skip -->
20+
1921
```json5
2022
/* eslint jsonc/array-bracket-newline: 'error' */
2123
{
@@ -42,10 +44,12 @@ This rule enforces line breaks after opening and before closing array brackets.
4244

4345
```json
4446
{
45-
"jsonc/array-bracket-newline": ["error", {
46-
"multiline": true,
47-
"minItems": null
48-
}]
47+
"jsonc/array-bracket-newline": ["error",
48+
{
49+
"multiline": true,
50+
"minItems": null
51+
}
52+
]
4953
}
5054
```
5155

docs/rules/array-bracket-spacing.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This rule enforces consistent spacing inside array brackets.
1616

1717
<eslint-code-block fix>
1818

19+
<!-- eslint-skip -->
20+
1921
```json5
2022
/* eslint jsonc/array-bracket-spacing: 'error' */
2123
{
@@ -33,11 +35,13 @@ This rule enforces consistent spacing inside array brackets.
3335

3436
```json
3537
{
36-
"jsonc/array-bracket-spacing": ["error", "never"]
38+
"jsonc/array-bracket-spacing": ["error",
39+
"never"
40+
]
3741
}
3842
```
3943

40-
Same as [array-bracket-spacing] rule option. See [here](https://eslint.org/docs/rules/array-bracket-spacing#options) for details.
44+
Same as [array-bracket-spacing] rule option. See [here](https://eslint.org/docs/rules/array-bracket-spacing#options) for details.
4145

4246
## :couple: Related rules
4347

docs/rules/array-element-newline.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This rule enforces line breaks between array elements.
1616

1717
<eslint-code-block fix>
1818

19+
<!-- eslint-skip -->
20+
1921
```json5
2022
/* eslint jsonc/array-element-newline: 'error' */
2123
{
@@ -35,11 +37,13 @@ This rule enforces line breaks between array elements.
3537

3638
```json
3739
{
38-
"jsonc/array-element-newline": ["error", "always"]
40+
"jsonc/array-element-newline": ["error",
41+
"always"
42+
]
3943
}
4044
```
4145

42-
Same as [array-element-newline] rule option. See [here](https://eslint.org/docs/rules/array-element-newline#options) for details.
46+
Same as [array-element-newline] rule option. See [here](https://eslint.org/docs/rules/array-element-newline#options) for details.
4347

4448
## :couple: Related rules
4549

docs/rules/comma-dangle.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ This rule enforces consistent use of trailing commas in object and array literal
1717

1818
<eslint-code-block fix>
1919

20+
<!-- eslint-skip -->
21+
2022
```json5
2123
/* eslint jsonc/comma-dangle: 'error' */
2224
{
@@ -36,14 +38,20 @@ This rule enforces consistent use of trailing commas in object and array literal
3638

3739
## :wrench: Options
3840

41+
<!-- eslint-skip -->
42+
3943
```json
4044
{
41-
"jsonc/comma-dangle": ["error", "never"],
42-
// or
43-
"jsonc/comma-dangle": ["error", {
44-
"arrays": "never",
45-
"objects": "never"
46-
}]
45+
"jsonc/comma-dangle": ["error",
46+
"never"
47+
],
48+
// or
49+
"jsonc/comma-dangle": ["error",
50+
{
51+
"arrays": "never",
52+
"objects": "never"
53+
}
54+
]
4755
}
4856
```
4957

docs/rules/comma-style.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This rule enforce consistent comma style in array literals and object literals.
1616

1717
<eslint-code-block fix>
1818

19+
<!-- eslint-skip -->
20+
1921
```json5
2022
/* eslint jsonc/comma-style: 'error' */
2123
{
@@ -43,7 +45,9 @@ This rule enforce consistent comma style in array literals and object literals.
4345

4446
```json
4547
{
46-
"jsonc/comma-style": ["error", "last"]
48+
"jsonc/comma-style": ["error",
49+
"last"
50+
]
4751
}
4852
```
4953

docs/rules/indent.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This rule enforces a consistent indentation style. The default style is `4 space
1616

1717
<eslint-code-block fix>
1818

19+
<!-- eslint-skip -->
20+
1921
```json5
2022
/* eslint jsonc/indent: 'error' */
2123
{
@@ -37,7 +39,10 @@ This rule enforces a consistent indentation style. The default style is `4 space
3739

3840
```json
3941
{
40-
"jsonc/indent": ["error", 4, {}]
42+
"jsonc/indent": ["error",
43+
4,
44+
{}
45+
]
4146
}
4247
```
4348

docs/rules/key-name-casing.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This rule enforces a naming convention to property key names.
1414

1515
<eslint-code-block>
1616

17+
<!-- eslint-skip -->
18+
1719
```json5
1820
/* eslint jsonc/key-name-casing: 'error' */
1921
{
@@ -36,14 +38,16 @@ Nothing.
3638

3739
```json5
3840
{
39-
"jsonc/key-name-casing": ["error", {
40-
"camelCase": true,
41-
"PascalCase": false,
42-
"SCREAMING_SNAKE_CASE": false,
43-
"kebab-case": false,
44-
"snake_case": false,
45-
"ignores": []
46-
}]
41+
"jsonc/key-name-casing": ["error",
42+
{
43+
"camelCase": true,
44+
"PascalCase": false,
45+
"SCREAMING_SNAKE_CASE": false,
46+
"kebab-case": false,
47+
"snake_case": false,
48+
"ignores": []
49+
}
50+
]
4751
}
4852
```
4953

0 commit comments

Comments
 (0)