Skip to content

Commit 7aa233c

Browse files
authored
refactor: ban-ts-ignore converter to ban-ts-comment (#616)
1 parent fc91ca7 commit 7aa233c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/rules/converters/ban-ts-ignore.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { RuleConverter } from "../converter";
22

3+
export const BAN_TS_IGNORE_NOTICE =
4+
"The typescript-eslint now bans @ts-<directive> comments from being used";
5+
36
export const convertBanTsIgnore: RuleConverter = () => {
47
return {
58
rules: [
69
{
7-
ruleName: "@typescript-eslint/ban-ts-ignore",
10+
ruleName: "@typescript-eslint/ban-ts-comment",
11+
notices: [BAN_TS_IGNORE_NOTICE],
812
},
913
],
1014
};

src/rules/converters/tests/ban-ts-ignore.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { convertBanTsIgnore } from "../ban-ts-ignore";
1+
import { convertBanTsIgnore, BAN_TS_IGNORE_NOTICE } from "../ban-ts-ignore";
22

33
describe(convertBanTsIgnore, () => {
44
test("conversion without arguments", () => {
@@ -9,7 +9,8 @@ describe(convertBanTsIgnore, () => {
99
expect(result).toEqual({
1010
rules: [
1111
{
12-
ruleName: "@typescript-eslint/ban-ts-ignore",
12+
ruleName: "@typescript-eslint/ban-ts-comment",
13+
notices: [BAN_TS_IGNORE_NOTICE],
1314
},
1415
],
1516
});

0 commit comments

Comments
 (0)