From 525961ada7734d890e7250a3450cdad996805828 Mon Sep 17 00:00:00 2001 From: miZyind Date: Mon, 9 May 2022 09:34:24 +0700 Subject: [PATCH 1/3] docs: correct doc of parameter-properties to match the code --- .../docs/rules/parameter-properties.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index 55320177c0a3..65641ca66893 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -20,9 +20,9 @@ It may take an options object containing either or both of: ### `"allow"` -If you would like to ignore certain kinds of properties then you may pass an object containing `"allows"` as an array of any of the following options: +If you would like to ignore certain kinds of properties then you may pass an object containing `"allow"` as an array of any of the following options: -- `allows`, an array containing one or more of the allowed modifiers. Valid values are: +- `allow`, an array containing one or more of the allowed modifiers. Valid values are: - `readonly`, allows **readonly** parameter properties. - `private`, allows **private** parameter properties. - `protected`, allows **protected** parameter properties. @@ -35,7 +35,7 @@ For example, to ignore `public` properties: ```json { - "@typescript-eslint/parameter-properties": [ + "@typescript-eslint/parameter-property": [ true, { "allow": ["public"] @@ -102,7 +102,7 @@ class Foo { ### readonly -Examples of code for the `{ "allows": ["readonly"] }` options: +Examples of code for the `{ "allow": ["readonly"] }` options: @@ -148,7 +148,7 @@ class Foo { ### private -Examples of code for the `{ "allows": ["private"] }` options: +Examples of code for the `{ "allow": ["private"] }` options: @@ -194,7 +194,7 @@ class Foo { ### protected -Examples of code for the `{ "allows": ["protected"] }` options: +Examples of code for the `{ "allow": ["protected"] }` options: @@ -240,7 +240,7 @@ class Foo { ### public -Examples of code for the `{ "allows": ["public"] }` options: +Examples of code for the `{ "allow": ["public"] }` options: @@ -286,7 +286,7 @@ class Foo { ### private readonly -Examples of code for the `{ "allows": ["private readonly"] }` options: +Examples of code for the `{ "allow": ["private readonly"] }` options: @@ -422,9 +422,9 @@ class Foo { } ``` -### `"parameter-properties"` +### `"parameter-property"` -Examples of code for the `{ "prefer": ["parameter-properties"] }` option: +Examples of code for the `{ "prefer": ["parameter-property"] }` option: From e3fd14e5623ba5bc43120c4aecbc8908f86ef1b4 Mon Sep 17 00:00:00 2001 From: miZyind Date: Mon, 9 May 2022 09:42:30 +0700 Subject: [PATCH 2/3] docs: revert mistake --- packages/eslint-plugin/docs/rules/parameter-properties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index 65641ca66893..4a4f02e264ba 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -35,7 +35,7 @@ For example, to ignore `public` properties: ```json { - "@typescript-eslint/parameter-property": [ + "@typescript-eslint/parameter-properties": [ true, { "allow": ["public"] From 575a8304b7b3736682a7a17f02a9457b722ba0bd Mon Sep 17 00:00:00 2001 From: miZyind Date: Mon, 9 May 2022 10:22:33 +0700 Subject: [PATCH 3/3] docs: correct invalid options --- packages/eslint-plugin/docs/rules/parameter-properties.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index 4a4f02e264ba..7a86a114902d 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -332,7 +332,7 @@ class Foo { ### protected readonly -Examples of code for the `{ "allows": ["protected readonly"] }` options: +Examples of code for the `{ "allow": ["protected readonly"] }` options: @@ -378,7 +378,7 @@ class Foo { ### public readonly -Examples of code for the `{ "allows": ["public readonly"] }` options: +Examples of code for the `{ "allow": ["public readonly"] }` options: @@ -424,7 +424,7 @@ class Foo { ### `"parameter-property"` -Examples of code for the `{ "prefer": ["parameter-property"] }` option: +Examples of code for the `{ "prefer": "parameter-property" }` option: