Skip to content

Commit ae0271c

Browse files
authored
docs(eslint-plugin): correct no longer valid references and examples (typescript-eslint#3152)
1 parent 84fe328 commit ae0271c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

packages/eslint-plugin/docs/rules/consistent-type-imports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ const x: import('Bar') = 1;
6161
## When Not To Use It
6262

6363
- If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed.
64-
- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.
64+
- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.<br/>
6565
type-only imports cannot be used with these libraries. See [#2559](https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580)
6666
- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule.

packages/eslint-plugin/docs/rules/no-magic-numbers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Examples of **incorrect** code for the `{ "ignoreEnums": false }` option:
5353
```ts
5454
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": false }]*/
5555

56-
enum foo = {
57-
SECOND = 1000,
56+
enum foo {
57+
SECOND = 1000,
5858
}
5959
```
6060

@@ -63,8 +63,8 @@ Examples of **correct** code for the `{ "ignoreEnums": true }` option:
6363
```ts
6464
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": true }]*/
6565

66-
enum foo = {
67-
SECOND = 1000,
66+
enum foo {
67+
SECOND = 1000,
6868
}
6969
```
7070

packages/eslint-plugin/docs/rules/triple-slash-reference.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Use of triple-slash reference type directives is discouraged in favor of the newer `import` style. This rule allows you to ban use of `/// <reference path="" />`, `/// <reference types="" />`, or `/// <reference lib="" />` directives.
44

5-
Consider using this rule in place of [`no-triple-slash-reference`](./no-triple-slash-reference.md) which has been deprecated.
6-
75
## Rule Details
86

97
With `{ "path": "never", "types": "never", "lib": "never" }` options set, the following will all be **incorrect** usage:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy