Skip to content

Commit 6fa0bdd

Browse files
authored
docs: auto-generate configs list and some rule options lists with eslint-doc-generator (#416)
1 parent 257ba14 commit 6fa0bdd

File tree

6 files changed

+22
-11
lines changed

6 files changed

+22
-11
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ You can extend from a configuration in order to simplify manual configuration of
1313

1414
For more details on how to extend your configuration from a plugin configuration, please see the [ESLint plugin configuration documentation](https://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin).
1515

16-
| | Name | Description |
17-
| :-- | :--- | :---------- |
18-
|| recommended | This configuration includes rules which I recommend to avoid QUnit runtime errors or incorrect behavior, some of which can be difficult to debug. Some of these rules also encourage best practices that help QUnit work better for you. You can use this configuration by extending from `"plugin:qunit/recommended"` in your configuration file. |
16+
<!-- begin auto-generated configs list -->
17+
18+
| | Name | Description |
19+
| :- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20+
|| `recommended` | This configuration includes rules which I recommend to avoid QUnit runtime errors or incorrect behavior, some of which can be difficult to debug. Some of these rules also encourage best practices that help QUnit work better for you. You can use this configuration by extending from `"plugin:qunit/recommended"` in your configuration file. |
21+
22+
<!-- end auto-generated configs list -->
1923

2024
## Rules
2125

docs/rules/no-ok-equality.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ QUnit.test("Name", function (assert) { assert.ok(x instanceof Number); });
6666

6767
## Options
6868

69-
This rule takes an optional object containing:
69+
<!-- begin auto-generated rule options list -->
7070

71-
* `allowGlobals` (boolean, default: true): Whether the rule should check global assertions
71+
| Name | Description | Type | Default |
72+
| :------------ | :----------------------------------------------- | :------ | :------ |
73+
| `allowGlobal` | Whether the rule should check global assertions. | Boolean | `true` |
74+
75+
<!-- end auto-generated rule options list -->
7276

7377
## When Not to Use It
7478

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
// eslint-disable-next-line sort-keys
1616
configs: {
1717
recommended: {
18+
description: "This configuration includes rules which I recommend to avoid QUnit runtime errors or incorrect behavior, some of which can be difficult to debug. Some of these rules also encourage best practices that help QUnit work better for you. You can use this configuration by extending from `\"plugin:qunit/recommended\"` in your configuration file.",
1819
plugins: ["qunit"],
1920
rules: {
2021
"qunit/assert-args": "error",

lib/rules/no-ok-equality.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ module.exports = {
2828
type: "object",
2929
properties: {
3030
allowGlobal: {
31-
type: "boolean"
31+
type: "boolean",
32+
description: "Whether the rule should check global assertions.",
33+
default: true
3234
}
3335
},
3436
additionalProperties: false

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"chai": "^4.3.10",
3333
"coveralls": "^3.1.1",
3434
"eslint": "^8.51.0",
35-
"eslint-doc-generator": "^1.4.3",
35+
"eslint-doc-generator": "^1.5.1",
3636
"eslint-plugin-eslint-comments": "^3.2.0",
3737
"eslint-plugin-eslint-plugin": "^5.1.1",
3838
"eslint-plugin-markdown": "^3.0.1",

0 commit comments

Comments
 (0)