Skip to content

Commit b6a3cd6

Browse files
Add no-dynamic-delete converter (#1058)
* Add no-dynamic-delete converter * Update src/converters/lintConfigs/rules/ruleConverters.ts Co-authored-by: Josh Goldberg <me@joshuakgoldberg.com>
1 parent cfff9ce commit b6a3cd6

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

src/converters/lintConfigs/rules/ruleConverters.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { convertNoDuplicateImports } from "./ruleConverters/no-duplicate-imports
5353
import { convertNoDuplicateSuper } from "./ruleConverters/no-duplicate-super";
5454
import { convertNoDuplicateSwitchCase } from "./ruleConverters/no-duplicate-switch-case";
5555
import { convertNoDuplicateVariable } from "./ruleConverters/no-duplicate-variable";
56+
import { convertNoDynamicDelete } from './ruleConverters/no-dynamic-delete';
5657
import { convertNoEmpty } from "./ruleConverters/no-empty";
5758
import { convertNoEmptyInterface } from "./ruleConverters/no-empty-interface";
5859
import { convertNoEval } from "./ruleConverters/no-eval";
@@ -301,6 +302,7 @@ export const ruleConverters = new Map([
301302
["no-duplicate-super", convertNoDuplicateSuper],
302303
["no-duplicate-switch-case", convertNoDuplicateSwitchCase],
303304
["no-duplicate-variable", convertNoDuplicateVariable],
305+
["no-dynamic-delete", convertNoDynamicDelete],
304306
["no-empty-interface", convertNoEmptyInterface],
305307
["no-empty", convertNoEmpty],
306308
["no-eval", convertNoEval],
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { RuleConverter } from "../ruleConverter";
2+
3+
export const convertNoDynamicDelete: RuleConverter = () => {
4+
return {
5+
rules: [
6+
{
7+
ruleName: "@typescript-eslint/no-dynamic-delete",
8+
},
9+
],
10+
};
11+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { convertNoDynamicDelete } from "../no-dynamic-delete";
2+
3+
describe(convertNoDynamicDelete, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertNoDynamicDelete({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({
10+
rules: [
11+
{
12+
ruleName: "@typescript-eslint/no-dynamic-delete",
13+
},
14+
],
15+
});
16+
});
17+
});

0 commit comments

Comments
 (0)