Skip to content

Commit 51a87c2

Browse files
committed
Update document
1 parent 5ce8912 commit 51a87c2

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[![Build Status](https://github.com/ota-meshi/eslint-plugin-jsonc/workflows/CI/badge.svg?branch=master)](https://github.com/ota-meshi/eslint-plugin-jsonc/actions?query=workflow%3ACI)
1313
[![Coverage Status](https://coveralls.io/repos/github/ota-meshi/eslint-plugin-jsonc/badge.svg?branch=master)](https://coveralls.io/github/ota-meshi/eslint-plugin-jsonc?branch=master)
1414

15-
## Features
15+
## :name_badge: Features
1616

1717
This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using [JSON], [JSONC] and [JSON5].
1818

@@ -21,7 +21,7 @@ This ESLint plugin provides linting rules relate to better ways to help you avoi
2121

2222
You can check on the [Online DEMO](https://ota-meshi.github.io/eslint-plugin-jsonc/playground/).
2323

24-
## Why is it ESLint plugin?
24+
## :question: Why is it ESLint plugin?
2525

2626
ESLint is a great linter for JavaScript.
2727
Since [JSON] is a subset of JavaScript, the same parser and rules can be applied to [JSON].
@@ -34,11 +34,11 @@ Moreover, You can do the same linting using the extended rules of the ESLint cor
3434

3535
<!--DOCS_IGNORE_START-->
3636

37-
## Documentation
37+
## :book: Documentation
3838

3939
See [documents](https://ota-meshi.github.io/eslint-plugin-jsonc/).
4040

41-
## Installation
41+
## :cd: Installation
4242

4343
```bash
4444
npm install --save-dev eslint eslint-plugin-jsonc
@@ -51,7 +51,7 @@ npm install --save-dev eslint eslint-plugin-jsonc
5151
5252
<!--DOCS_IGNORE_END-->
5353

54-
## Usage
54+
## :book: Usage
5555

5656
<!--USAGE_SECTION_START-->
5757
<!--USAGE_GUIDE_START-->
@@ -97,7 +97,7 @@ eslint --ext .js,.json src
9797
eslint "src/**/*.{js,json}"
9898
```
9999

100-
## Editor Integrations
100+
## :computer: Editor Integrations
101101

102102
### Visual Studio Code
103103

@@ -122,7 +122,7 @@ Example **.vscode/settings.json**:
122122
<!--USAGE_GUIDE_END-->
123123
<!--USAGE_SECTION_END-->
124124

125-
## Rules
125+
## :white_check_mark: Rules
126126

127127
<!--RULES_SECTION_START-->
128128

@@ -131,7 +131,7 @@ The rules with the following star :star: are included in the config.
131131

132132
<!--RULES_TABLE_START-->
133133

134-
## JSONC Rules
134+
### JSONC Rules
135135

136136
| Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
137137
|:--------|:------------|:-------:|:----:|:-----:|:-----:|
@@ -143,7 +143,7 @@ The rules with the following star :star: are included in the config.
143143
| [jsonc/no-undefined-value](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html) | disallow `undefined` | | :star: | :star: | :star: |
144144
| [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: | |
145145

146-
## Extension Rules
146+
### Extension Rules
147147

148148
| Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
149149
|:--------|:------------|:-------:|:----:|:-----:|:-----:|
@@ -172,7 +172,7 @@ The rules with the following star :star: are included in the config.
172172

173173
<!--DOCS_IGNORE_START-->
174174

175-
## Contributing
175+
## :beers: Contributing
176176

177177
Welcome contributing!
178178

@@ -185,7 +185,7 @@ Please use GitHub's Issues/PRs.
185185

186186
<!--DOCS_IGNORE_END-->
187187

188-
## License
188+
## :lock: License
189189

190190
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
191191

docs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[![Build Status](https://github.com/ota-meshi/eslint-plugin-jsonc/workflows/CI/badge.svg?branch=master)](https://github.com/ota-meshi/eslint-plugin-jsonc/actions?query=workflow%3ACI)
1313
[![Coverage Status](https://coveralls.io/repos/github/ota-meshi/eslint-plugin-jsonc/badge.svg?branch=master)](https://coveralls.io/github/ota-meshi/eslint-plugin-jsonc?branch=master)
1414

15-
## Features
15+
## :name_badge: Features
1616

1717
This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using [JSON], [JSONC] and [JSON5].
1818

@@ -21,7 +21,7 @@ This ESLint plugin provides linting rules relate to better ways to help you avoi
2121

2222
You can check on the [Online DEMO](./playground/).
2323

24-
## Why is it ESLint plugin?
24+
## :question: Why is it ESLint plugin?
2525

2626
ESLint is a great linter for JavaScript.
2727
Since [JSON] is a subset of JavaScript, the same parser and rules can be applied to [JSON].
@@ -32,15 +32,15 @@ Also, [JSONC] and [JSON5], which are variants of [JSON], are more similar to Jav
3232
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.
3333
Moreover, You can do the same linting using the extended rules of the ESLint core rules provided by this plugin.
3434

35-
## Usage
35+
## :book: Usage
3636

3737
See [User Guide](./user-guide/README.md).
3838

39-
## Rules
39+
## :white_check_mark: Rules
4040

4141
See [Available Rules](./rules/README.md).
4242

43-
## License
43+
## :lock: License
4444

4545
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
4646

docs/user-guide/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# User Guide
22

3-
## Installation
3+
## :cd: Installation
44

55
```bash
66
npm install --save-dev eslint eslint-plugin-jsonc
@@ -11,7 +11,7 @@ npm install --save-dev eslint eslint-plugin-jsonc
1111
- Node.js v8.10.0 and above
1212
:::
1313

14-
## Usage
14+
## :book: Usage
1515

1616
<!--USAGE_GUIDE_START-->
1717

@@ -56,7 +56,7 @@ eslint --ext .js,.json src
5656
eslint "src/**/*.{js,json}"
5757
```
5858

59-
## Editor Integrations
59+
## :computer: Editor Integrations
6060

6161
### Visual Studio Code
6262

tools/render-rules.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { rules } from "../lib/utils/rules"
33

44
//eslint-disable-next-line require-jsdoc
55
export default function renderRulesTableContent(
6+
categoryLevel: number,
67
buildRulePath = (ruleName: string) => `./${ruleName}.md`,
78
) {
89
const pluginRules = rules.filter(
@@ -51,13 +52,13 @@ export default function renderRulesTableContent(
5152

5253
// -----------------------------------------------------------------------------
5354
let rulesTableContent = `
54-
## JSONC Rules
55+
#${"#".repeat(categoryLevel)} JSONC Rules
5556
5657
| Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
5758
|:--------|:------------|:-------:|:----:|:-----:|:-----:|
5859
${pluginRules.map(toRuleRow).join("\n")}
5960
60-
## Extension Rules
61+
#${"#".repeat(categoryLevel)} Extension Rules
6162
6263
| Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
6364
|:--------|:------------|:-------:|:----:|:-----:|:-----:|

tools/update-docs-rules-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ The \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/co
1616
The rules with the following star :star: are included in the \`plugin:jsonc/recommended\` config.
1717
1818
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
19-
${renderRulesTableContent()}`,
19+
${renderRulesTableContent(1)}`,
2020
)

tools/update-readme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import renderRulesTableContent from "./render-rules"
55
const isWin = os.platform().startsWith("win")
66

77
let insertText = `\n${renderRulesTableContent(
8+
2,
89
(name) =>
910
`https://ota-meshi.github.io/eslint-plugin-jsonc/rules/${name}.html`,
1011
)}\n`

0 commit comments

Comments
 (0)