Skip to content

Commit

Permalink
Corrected no-import-side-effect output rule (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg authored Nov 16, 2019
1 parent d81d262 commit 1aabfa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/rules/converters/no-import-side-effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
],
}),
},
Expand Down
8 changes: 5 additions & 3 deletions src/rules/converters/tests/no-import-side-effect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ describe(convertNoImportSideEffect, () => {
expect(result).toEqual({
rules: [
{
ruleName: "no-import-side-effect",
plugins: ["eslint-plugin-import"],
ruleName: "import/no-unassigned-import",
},
],
});
Expand All @@ -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",
},
],
});
Expand Down

0 comments on commit 1aabfa2

Please sign in to comment.