From 1aabfa2a8893cc262756ed086386a0b71ff2fc77 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 15 Nov 2019 22:11:47 -0500 Subject: [PATCH] Corrected no-import-side-effect output rule (#271) --- src/rules/converters/no-import-side-effect.ts | 5 +++-- src/rules/converters/tests/no-import-side-effect.test.ts | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/rules/converters/no-import-side-effect.ts b/src/rules/converters/no-import-side-effect.ts index c4f593e1..f1bc344d 100644 --- a/src/rules/converters/no-import-side-effect.ts +++ b/src/rules/converters/no-import-side-effect.ts @@ -4,10 +4,11 @@ export const convertNoImportSideEffect: RuleConverter = tsLintRule => { return { rules: [ { - ruleName: "no-import-side-effect", + plugins: ["eslint-plugin-import"], + ruleName: "import/no-unassigned-import", ...(tsLintRule.ruleArguments.length !== 0 && { notices: [ - "ESLint's no-import-side-effect now accepts a glob pattern for ignores; you'll need to manually convert your ignore-module settings.", + "ESLint's import/no-unassigned-import now accepts a glob pattern for ignores; you'll need to manually convert your ignore-module settings.", ], }), }, diff --git a/src/rules/converters/tests/no-import-side-effect.test.ts b/src/rules/converters/tests/no-import-side-effect.test.ts index f27d1e15..341f3f87 100644 --- a/src/rules/converters/tests/no-import-side-effect.test.ts +++ b/src/rules/converters/tests/no-import-side-effect.test.ts @@ -9,7 +9,8 @@ describe(convertNoImportSideEffect, () => { expect(result).toEqual({ rules: [ { - ruleName: "no-import-side-effect", + plugins: ["eslint-plugin-import"], + ruleName: "import/no-unassigned-import", }, ], }); @@ -23,10 +24,11 @@ describe(convertNoImportSideEffect, () => { expect(result).toEqual({ rules: [ { - ruleName: "no-import-side-effect", + plugins: ["eslint-plugin-import"], notices: [ - "ESLint's no-import-side-effect now accepts a glob pattern for ignores; you'll need to manually convert your ignore-module settings.", + "ESLint's import/no-unassigned-import now accepts a glob pattern for ignores; you'll need to manually convert your ignore-module settings.", ], + ruleName: "import/no-unassigned-import", }, ], });