Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: auto-generate readme configs list and some rule doc options lists with eslint-doc-generator #416

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"chai": "^4.3.10",
"coveralls": "^3.1.1",
"eslint": "^8.51.0",
"eslint-doc-generator": "^1.4.3",
"eslint-doc-generator": "^1.5.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.1.1",
"eslint-plugin-markdown": "^3.0.1",
Expand Down