Skip to content

Commit

Permalink
docs: auto-generate configs list and some rule options lists with esl…
Browse files Browse the repository at this point in the history
…int-doc-generator
  • Loading branch information
bmish committed Oct 13, 2023
1 parent 257ba14 commit c88d09d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ You can extend from a configuration in order to simplify manual configuration of

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).

| | Name | Description |
| :-- | :--- | :---------- |
|| 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. |
<!-- begin auto-generated configs list -->

| | Name | Description |
| :- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|| `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. |

<!-- end auto-generated configs list -->

## Rules

Expand Down
8 changes: 6 additions & 2 deletions docs/rules/no-ok-equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ QUnit.test("Name", function (assert) { assert.ok(x instanceof Number); });

## Options

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

* `allowGlobals` (boolean, default: true): Whether the rule should check global assertions
| Name | Description | Type | Default |
| :------------ | :----------------------------------------------- | :------ | :------ |
| `allowGlobal` | Whether the rule should check global assertions. | Boolean | `true` |

<!-- end auto-generated rule options list -->

## When Not to Use It

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
// eslint-disable-next-line sort-keys
configs: {
recommended: {
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.",
plugins: ["qunit"],
rules: {
"qunit/assert-args": "error",
Expand Down
4 changes: 3 additions & 1 deletion lib/rules/no-ok-equality.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ module.exports = {
type: "object",
properties: {
allowGlobal: {
type: "boolean"
type: "boolean",
description: "Whether the rule should check global assertions.",
default: true
}
},
additionalProperties: false
Expand Down

0 comments on commit c88d09d

Please sign in to comment.