Skip to content

Commit fbd2d97

Browse files
committed
docs: automater docs with eslint-doc-generator
1 parent 92bb302 commit fbd2d97

7 files changed

+400
-27
lines changed

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,18 @@ Then configure the rules you want to use under the rules section.
4444

4545
## Rules
4646

47-
- [`no-const-outside-module-scope`](./docs/rules/no-const-outside-module-scope.md)
48-
- [`no-empty-yuidoc-code-blocks`](./docs/rules/no-empty-yuidoc-code-blocks.md)
49-
- [`require-yuidoc-access`](./docs/rules/require-yuidoc-access.md)
50-
- [`require-yuidoc-code-block-type`](./docs/rules/require-yuidoc-code-block-type.md)
47+
<!-- begin auto-generated rules list -->
48+
49+
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
50+
51+
| Name                           | Description | 🔧 |
52+
| :----------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :- |
53+
| [no-const-outside-module-scope](docs/rules/no-const-outside-module-scope.md) | disallow `const` from being used outside of the module scope (e.g. in functions) | 🔧 |
54+
| [no-empty-yuidoc-code-blocks](docs/rules/no-empty-yuidoc-code-blocks.md) | disallow empty code blocks in YUIDoc comments | |
55+
| [require-yuidoc-access](docs/rules/require-yuidoc-access.md) | require that every YUIDoc comment has `@public`, `@protected` or `@private` declared | |
56+
| [require-yuidoc-code-block-type](docs/rules/require-yuidoc-code-block-type.md) | require that every code blocks in YUIDoc comments has a type associated | |
57+
58+
<!-- end auto-generated rules list -->
5159

5260
## Related
5361

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
# no-const-outside-module-scope
1+
# Disallow `const` from being used outside of the module scope (e.g. in functions) (`ember-internal/no-const-outside-module-scope`)
22

3-
Prevent `const` from being used outside of the module scope (e.g. in functions).
3+
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
4+
5+
<!-- end auto-generated rule header -->

docs/rules/no-empty-yuidoc-code-blocks.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# no-empty-yuidoc-code-blocks
1+
# Disallow empty code blocks in YUIDoc comments (`ember-internal/no-empty-yuidoc-code-blocks`)
22

3-
Prevents empty code blocks in YUIDoc comments, e.g.
3+
<!-- end auto-generated rule header -->
4+
5+
## Examples
46

57
```js
68
/**

docs/rules/require-yuidoc-access.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# require-yuidoc-access
1+
# Require that every YUIDoc comment has `@public`, `@protected` or `@private` declared (`ember-internal/require-yuidoc-access`)
22

3-
Ensures that every YUIDoc comment has `@public`, `@protected` or `@private` declared.
3+
<!-- end auto-generated rule header -->

docs/rules/require-yuidoc-code-block-type.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# require-yuidoc-code-block-type
1+
# Require that every code blocks in YUIDoc comments has a type associated (`ember-internal/require-yuidoc-code-block-type`)
22

3-
Ensures that every code blocks in YUIDoc comments has a type associated.
3+
<!-- end auto-generated rule header -->
4+
5+
## Examples
46

57
```js
68
/**

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"lint": "npm-run-all \"lint:*\"",
1515
"lint:docs": "markdownlint \"**/*.md\"",
1616
"lint:docs:fix": "yarn lint:docs --fix",
17+
"lint:eslint-docs": "yarn update:eslint-docs --check",
1718
"lint:js": "eslint .",
1819
"lint:js:fix": "yarn lint:js --fix",
19-
"test": "mocha tests --recursive"
20+
"test": "mocha tests --recursive",
21+
"update:eslint-docs": "eslint-doc-generator"
2022
},
2123
"dependencies": {
2224
"line-column": "^1.0.2",
@@ -25,6 +27,7 @@
2527
"devDependencies": {
2628
"eslint": "^8.0.0",
2729
"eslint-config-prettier": "^8.0.0",
30+
"eslint-doc-generator": "^1.0.2",
2831
"eslint-plugin-eslint-plugin": "^5.0.0",
2932
"eslint-plugin-node": "^11.1.0",
3033
"eslint-plugin-prettier": "^4.0.0",

0 commit comments

Comments
 (0)