Skip to content

Commit

Permalink
docs: fix eslint docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Mar 13, 2024
1 parent cecd290 commit 3a7f95f
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 55 deletions.
72 changes: 49 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The [below section](#rules) gives details on which rules are enabled by each rul
💼 Configurations enabled in.\
⚠️ Configurations set to warn in.\
🚫 Configurations disabled in.\
🌐 Set in the `all` configuration.\
☑️ Set in the `lite` configuration.\
✅ Set in the `recommended` configuration.\
🔒 Set in the `strict` configuration.\
🎨 Set in the `stylistic` configuration.\
Expand All @@ -104,34 +104,60 @@ The [below section](#rules) gives details on which rules are enabled by each rul
💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting).\
❌ Deprecated.

| Name                          | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :--------------------------------------------------------------------------- | :------------------------------------------------------------------------ | :---------------------------------------------------- | :---- | :------------------------------------------------------------- | :- | :- | :- | :- |
| [functional-parameters](docs/rules/functional-parameters.md) | Enforce functional parameters. | 🌐 ✅ 🔒 ![badge-currying][] ![badge-lite][] | | ![badge-off][] | | | | |
| [immutable-data](docs/rules/immutable-data.md) | Enforce treating data as immutable. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-mutations][] | | ![badge-disable-type-checked][] ![badge-off][] | | | 💭 | |
| [no-classes](docs/rules/no-classes.md) | Disallow classes. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-other-paradigms][] | | ![badge-off][] | | | | |
| [no-conditional-statements](docs/rules/no-conditional-statements.md) | Disallow conditional statements. | 🌐 ✅ 🔒 ![badge-no-statements][] | | ![badge-disable-type-checked][] ![badge-lite][] ![badge-off][] | | | 💭 | |
| [no-expression-statements](docs/rules/no-expression-statements.md) | Disallow expression statements. | 🌐 ✅ 🔒 ![badge-no-statements][] | | ![badge-disable-type-checked][] ![badge-lite][] ![badge-off][] | | | 💭 | |
| [no-let](docs/rules/no-let.md) | Disallow mutable variables. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-mutations][] | | ![badge-off][] | | | | |
| [no-loop-statements](docs/rules/no-loop-statements.md) | Disallow imperative loops. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-statements][] | | ![badge-off][] | | | | |
| [no-mixed-types](docs/rules/no-mixed-types.md) | Restrict types so that only members of the same kind are allowed in them. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-other-paradigms][] | | ![badge-disable-type-checked][] ![badge-off][] | | | 💭 | |
| [no-promise-reject](docs/rules/no-promise-reject.md) | Disallow rejecting promises. | 🌐 | | ![badge-off][] | | | | |
| [no-return-void](docs/rules/no-return-void.md) | Disallow functions that don't return anything. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-statements][] | | ![badge-disable-type-checked][] ![badge-off][] | | | 💭 | |
| [no-this-expressions](docs/rules/no-this-expressions.md) | Disallow this access. | 🌐 🔒 ![badge-no-other-paradigms][] | |![badge-lite][] ![badge-off][] | | | | |
| [no-throw-statements](docs/rules/no-throw-statements.md) | Disallow throwing exceptions. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-exceptions][] | | ![badge-off][] | | | | |
| [no-try-statements](docs/rules/no-try-statements.md) | Disallow try-catch[-finally] and try-finally patterns. | 🌐 🔒 ![badge-no-exceptions][] | |![badge-lite][] ![badge-off][] | | | | |
| [prefer-immutable-types](docs/rules/prefer-immutable-types.md) | Require function parameters to be typed as certain immutability | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-mutations][] | | ![badge-disable-type-checked][] ![badge-off][] | 🔧 | 💡 | 💭 | |
| [prefer-property-signatures](docs/rules/prefer-property-signatures.md) | Prefer property signatures over method signatures. | 🌐 🎨 | | ![badge-disable-type-checked][] ![badge-off][] | | | 💭 | |
| [prefer-readonly-type](docs/rules/prefer-readonly-type.md) | Prefer readonly types over mutable types. | | | ![badge-disable-type-checked][] ![badge-off][] | 🔧 | | 💭 ||
| [prefer-tacit](docs/rules/prefer-tacit.md) | Replaces `x => f(x)` with just `f`. | | 🌐 🎨 | ![badge-disable-type-checked][] ![badge-off][] | | 💡 | 💭 | |
| [readonly-type](docs/rules/readonly-type.md) | Require consistently using either `readonly` keywords or `Readonly<T>` | 🌐 🎨 | | ![badge-disable-type-checked][] ![badge-off][] | 🔧 | | 💭 | |
| [type-declaration-immutability](docs/rules/type-declaration-immutability.md) | Enforce the immutability of types based on patterns. | 🌐 ✅ 🔒 ![badge-lite][] ![badge-no-mutations][] | | ![badge-disable-type-checked][] ![badge-off][] | 🔧 | | 💭 | |
### Currying

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :----------------------------------------------------------- | :----------------------------- | :------------------------ | :--- | :--- | :--- | :--- | :--- | :--- |
| [functional-parameters](docs/rules/functional-parameters.md) | Enforce functional parameters. | ☑️ ✅ 🔒 ![badge-currying][] | | | | | | |

### No Exceptions

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :------------------------------------------------------- | :----------------------------------------------------- | :----------------------------- | :--- | :--- | :--- | :--- | :--- | :--- |
| [no-promise-reject](docs/rules/no-promise-reject.md) | Disallow rejecting promises. | | | | | | | |
| [no-throw-statements](docs/rules/no-throw-statements.md) | Disallow throwing exceptions. | ☑️ ✅ 🔒 ![badge-no-exceptions][] | | | | | | |
| [no-try-statements](docs/rules/no-try-statements.md) | Disallow try-catch[-finally] and try-finally patterns. | 🔒 ![badge-no-exceptions][] | | ☑️ ✅ | | | | |

### No Mutations

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :--------------------------------------------------------------------------- | :-------------------------------------------------------------- | :---------------------------- | :--- | :--- | :--- | :--- | :--- | :--- |
| [immutable-data](docs/rules/immutable-data.md) | Enforce treating data as immutable. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | | | 💭 | |
| [no-let](docs/rules/no-let.md) | Disallow mutable variables. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | | | | |
| [prefer-immutable-types](docs/rules/prefer-immutable-types.md) | Require function parameters to be typed as certain immutability | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | 🔧 | 💡 | 💭 | |
| [prefer-readonly-type](docs/rules/prefer-readonly-type.md) | Prefer readonly types over mutable types. | | | | 🔧 | | 💭 ||
| [type-declaration-immutability](docs/rules/type-declaration-immutability.md) | Enforce the immutability of types based on patterns. | ☑️ ✅ 🔒 ![badge-no-mutations][] | | | 🔧 | | 💭 | |

### No Other Paradigms

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :------------------------------------------------------- | :------------------------------------------------------------------------ | :---------------------------------- | :--- | :--- | :--- | :--- | :--- | :--- |
| [no-classes](docs/rules/no-classes.md) | Disallow classes. | ☑️ ✅ 🔒 ![badge-no-other-paradigms][] | | | | | | |
| [no-mixed-types](docs/rules/no-mixed-types.md) | Restrict types so that only members of the same kind are allowed in them. | ☑️ ✅ 🔒 ![badge-no-other-paradigms][] | | | | | 💭 | |
| [no-this-expressions](docs/rules/no-this-expressions.md) | Disallow this access. | 🔒 ![badge-no-other-paradigms][] | | ☑️ ✅ | | | | |

### No Statements

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :------------------------------------------------------------------- | :--------------------------------------------- | :----------------------------- | :--- | :--- | :--- | :--- | :--- | :--- |
| [no-conditional-statements](docs/rules/no-conditional-statements.md) | Disallow conditional statements. | ✅ 🔒 ![badge-no-statements][] | | ☑️ | | | 💭 | |
| [no-expression-statements](docs/rules/no-expression-statements.md) | Disallow expression statements. | ✅ 🔒 ![badge-no-statements][] | | ☑️ | | | 💭 | |
| [no-loop-statements](docs/rules/no-loop-statements.md) | Disallow imperative loops. | ☑️ ✅ 🔒 ![badge-no-statements][] | | | | | | |
| [no-return-void](docs/rules/no-return-void.md) | Disallow functions that don't return anything. | ☑️ ✅ 🔒 ![badge-no-statements][] | | | | | 💭 | |

### Stylistic

| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 ||
| :--------------------------------------------------------------------- | :--------------------------------------------------------------------- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| [prefer-property-signatures](docs/rules/prefer-property-signatures.md) | Prefer property signatures over method signatures. | 🎨 | | | | | 💭 | |
| [prefer-tacit](docs/rules/prefer-tacit.md) | Replaces `x => f(x)` with just `f`. | | 🎨 | | | 💡 | 💭 | |
| [readonly-type](docs/rules/readonly-type.md) | Require consistently using either `readonly` keywords or `Readonly<T>` | 🎨 | | | 🔧 | | 💭 | |

<!-- end auto-generated rules list -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

[badge-currying]: https://img.shields.io/badge/-currying-red.svg
[badge-lite]: https://img.shields.io/badge/-lite-green.svg
[badge-no-exceptions]: https://img.shields.io/badge/-no--exceptions-blue.svg
[badge-no-mutations]: https://img.shields.io/badge/-no--mutations-orange.svg
[badge-no-other-paradigms]: https://img.shields.io/badge/-no--other--paradigms-yellow.svg
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/functional-parameters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce functional parameters (`functional/functional-parameters`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `currying`, `lite`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the `off` config.
💼 This rule is enabled in the following configs: `currying`, ☑️ `lite`, ✅ `recommended`, 🔒 `strict`.

<!-- end auto-generated rule header -->

Expand Down
10 changes: 5 additions & 5 deletions docs/rules/immutable-data.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enforce treating data as immutable (`functional/immutable-data`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-mutations`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the following configs: `disable-type-checked`, `off`.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-mutations`, ✅ `recommended`, 🔒 `strict`.

💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).

Expand Down Expand Up @@ -132,28 +132,28 @@ For example:
```jsonc
{
// Ignore all reassigning to object properties that are prefixed with "mutable_".
"ignoreAccessorPattern": "**.mutable_*"
"ignoreAccessorPattern": "**.mutable_*",
}
```

```jsonc
{
// Ignore all shallow mutations made to object properties that are prefixed with "mutable_".
"ignoreAccessorPattern": "**.mutable_*.*"
"ignoreAccessorPattern": "**.mutable_*.*",
}
```

```jsonc
{
// Ignore all deep mutations made to object properties that are prefixed with "mutable_".
"ignoreAccessorPattern": "**.mutable_*.*.**"
"ignoreAccessorPattern": "**.mutable_*.*.**",
}
```

```jsonc
{
// Ignore all deep mutations and reassigning to object properties that are prefixed with "mutable_".
"ignoreAccessorPattern": "**.mutable_*.**"
"ignoreAccessorPattern": "**.mutable_*.**",
// This is the same as `"ignoreAccessorPattern": ["**.mutable_*", "**.mutable_*.*.**"]`
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-classes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow classes (`functional/no-classes`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-other-paradigms`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the `off` config.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-other-paradigms`, ✅ `recommended`, 🔒 `strict`.

<!-- end auto-generated rule header -->

Expand Down
6 changes: 3 additions & 3 deletions docs/rules/no-conditional-statements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow conditional statements (`functional/no-conditional-statements`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the following configs: `disable-type-checked`, `lite`, `off`.
💼🚫 This rule is enabled in the following configs: `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the ☑️ `lite` config.

💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).

Expand Down Expand Up @@ -45,8 +45,8 @@ function foo(x, y) {
return x === y // if
? 0
: x > y // else if
? 1
: -1; // else
? 1
: -1; // else
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-expression-statements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow expression statements (`functional/no-expression-statements`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the following configs: `disable-type-checked`, `lite`, `off`.
💼🚫 This rule is enabled in the following configs: `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the ☑️ `lite` config.

💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-let.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow mutable variables (`functional/no-let`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-mutations`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the `off` config.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-mutations`, ✅ `recommended`, 🔒 `strict`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-loop-statements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow imperative loops (`functional/no-loop-statements`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the `off` config.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-statements`, ✅ `recommended`, 🔒 `strict`.

<!-- end auto-generated rule header -->

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-mixed-types.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Restrict types so that only members of the same kind are allowed in them (`functional/no-mixed-types`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-other-paradigms`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the following configs: `disable-type-checked`, `off`.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-other-paradigms`, ✅ `recommended`, 🔒 `strict`.

💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/no-promise-reject.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Disallow rejecting promises (`functional/no-promise-reject`)

💼🚫 This rule is enabled in the 🌐 `all` config. This rule is _disabled_ in the `off` config.

<!-- end auto-generated rule header -->

This rule disallows use of `Promise.reject()`.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-return-void.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow functions that don't return anything (`functional/no-return-void`)

💼🚫 This rule is enabled in the following configs: 🌐 `all`, `lite`, `no-statements`, ✅ `recommended`, 🔒 `strict`. This rule is _disabled_ in the following configs: `disable-type-checked`, `off`.
💼 This rule is enabled in the following configs: ☑️ `lite`, `no-statements`, ✅ `recommended`, 🔒 `strict`.

💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).

Expand Down
Loading

0 comments on commit 3a7f95f

Please sign in to comment.