Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/rules/converters/ban-ts-ignore.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { RuleConverter } from "../converter";

export const BAN_TS_IGNORE_NOTICE =
"The typescript-eslint now bans @ts-<directive> comments from being used";

export const convertBanTsIgnore: RuleConverter = () => {
return {
rules: [
{
ruleName: "@typescript-eslint/ban-ts-ignore",
ruleName: "@typescript-eslint/ban-ts-comment",
notices: [BAN_TS_IGNORE_NOTICE],
},
],
};
Expand Down
5 changes: 3 additions & 2 deletions src/rules/converters/tests/ban-ts-ignore.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { convertBanTsIgnore } from "../ban-ts-ignore";
import { convertBanTsIgnore, BAN_TS_IGNORE_NOTICE } from "../ban-ts-ignore";

describe(convertBanTsIgnore, () => {
test("conversion without arguments", () => {
Expand All @@ -9,7 +9,8 @@ describe(convertBanTsIgnore, () => {
expect(result).toEqual({
rules: [
{
ruleName: "@typescript-eslint/ban-ts-ignore",
ruleName: "@typescript-eslint/ban-ts-comment",
notices: [BAN_TS_IGNORE_NOTICE],
},
],
});
Expand Down