Skip to content

Commit 1d2e41a

Browse files
authored
feat(eslint-plugin): deprecate no-duplicate-imports in favour of import/no-duplicates (typescript-eslint#4973)
1 parent 13c05ae commit 1d2e41a

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

packages/eslint-plugin/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ In these cases, we create what we call an extension rule; a rule within our plug
209209
| [`@typescript-eslint/lines-between-class-members`](./docs/rules/lines-between-class-members.md) | Require or disallow an empty line between class members | | :wrench: | |
210210
| [`@typescript-eslint/no-array-constructor`](./docs/rules/no-array-constructor.md) | Disallow generic `Array` constructors | :white_check_mark: | :wrench: | |
211211
| [`@typescript-eslint/no-dupe-class-members`](./docs/rules/no-dupe-class-members.md) | Disallow duplicate class members | | | |
212-
| [`@typescript-eslint/no-duplicate-imports`](./docs/rules/no-duplicate-imports.md) | Disallow duplicate imports | | | |
213212
| [`@typescript-eslint/no-empty-function`](./docs/rules/no-empty-function.md) | Disallow empty functions | :white_check_mark: | | |
214213
| [`@typescript-eslint/no-extra-parens`](./docs/rules/no-extra-parens.md) | Disallow unnecessary parentheses | | :wrench: | |
215214
| [`@typescript-eslint/no-extra-semi`](./docs/rules/no-extra-semi.md) | Disallow unnecessary semicolons | :white_check_mark: | :wrench: | |

packages/eslint-plugin/docs/rules/no-duplicate-imports.md

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

33
Disallow duplicate imports.
44

5+
## DEPRECATED
6+
7+
This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md) rule.
8+
59
## Rule Details
610

711
This rule extends the base [`eslint/no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports) rule.

packages/eslint-plugin/docs/rules/no-implicit-any-catch.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ By default, TypeScript will type a catch clause variable as `any`, so explicitly
88

99
The `noImplicitAny` flag in TypeScript does not cover this for backwards compatibility reasons, however you can use `useUnknownInCatchVariables` (part of `strict`) instead of this rule.
1010

11+
## DEPRECATED
12+
1113
## Rule Details
1214

1315
This rule requires an explicit type to be declared on a catch clause variable.

packages/eslint-plugin/src/configs/all.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export = {
5353
'@typescript-eslint/no-dupe-class-members': 'error',
5454
'@typescript-eslint/no-duplicate-enum-values': 'error',
5555
'no-duplicate-imports': 'off',
56-
'@typescript-eslint/no-duplicate-imports': 'error',
5756
'@typescript-eslint/no-dynamic-delete': 'error',
5857
'no-empty-function': 'off',
5958
'@typescript-eslint/no-empty-function': 'error',

packages/eslint-plugin/src/rules/no-duplicate-imports.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ type MessageIds = util.InferMessageIdsTypeFromRule<typeof baseRule>;
1010
export default util.createRule<Options, MessageIds>({
1111
name: 'no-duplicate-imports',
1212
meta: {
13+
deprecated: true,
14+
replacedBy: ['import/no-duplicates'],
1315
type: 'problem',
1416
docs: {
1517
description: 'Disallow duplicate imports',

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