Skip to content

Commit

Permalink
docs(eslint-plugin): correct no longer valid references and examples (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 committed Mar 6, 2021
1 parent 84fe328 commit ae0271c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Expand Up @@ -61,6 +61,6 @@ const x: import('Bar') = 1;
## When Not To Use It

- 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.
- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.
- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.<br/>
type-only imports cannot be used with these libraries. See [#2559](https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580)
- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule.
8 changes: 4 additions & 4 deletions packages/eslint-plugin/docs/rules/no-magic-numbers.md
Expand Up @@ -53,8 +53,8 @@ Examples of **incorrect** code for the `{ "ignoreEnums": false }` option:
```ts
/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": false }]*/

enum foo = {
SECOND = 1000,
enum foo {
SECOND = 1000,
}
```

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

enum foo = {
SECOND = 1000,
enum foo {
SECOND = 1000,
}
```

Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-plugin/docs/rules/triple-slash-reference.md
Expand Up @@ -2,8 +2,6 @@

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.

Consider using this rule in place of [`no-triple-slash-reference`](./no-triple-slash-reference.md) which has been deprecated.

## Rule Details

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

0 comments on commit ae0271c

Please sign in to comment.