Skip to content

Commit 7a6cf58

Browse files
author
Josh Goldberg
authored
1 parent ce5ac5f commit 7a6cf58

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { convertUsePipeTransformInterface } from "../use-pipe-transform-interface";
2+
3+
describe(convertUsePipeTransformInterface, () => {
4+
test("conversion without arguments", () => {
5+
const result = convertUsePipeTransformInterface({
6+
ruleArguments: [],
7+
});
8+
9+
expect(result).toEqual({
10+
rules: [
11+
{
12+
ruleName: "@angular-eslint/use-pipe-transform-interface",
13+
},
14+
],
15+
plugins: ["@angular-eslint/eslint-plugin"],
16+
});
17+
});
18+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { RuleConverter } from "../../converter";
2+
3+
export const convertUsePipeTransformInterface: RuleConverter = () => {
4+
return {
5+
rules: [
6+
{
7+
ruleName: "@angular-eslint/use-pipe-transform-interface",
8+
},
9+
],
10+
plugins: ["@angular-eslint/eslint-plugin"],
11+
};
12+
};

src/rules/rulesConverters.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ import { convertNoLifecycleCall } from "./converters/codelyzer/no-lifecycle-call
155155
import { convertUseInjectableProvidedIn } from "./converters/codelyzer/use-injectable-provided-in";
156156
import { convertUseLifecycleInterface } from "./converters/codelyzer/use-lifecycle-interface";
157157
import { convertUsePipeDecorator } from "./converters/codelyzer/use-pipe-decorator";
158+
import { convertUsePipeTransformInterface } from "./converters/codelyzer/use-pipe-transform-interface";
158159

159160
/**
160161
* Keys TSLint rule names to their ESLint rule converters.
@@ -314,6 +315,7 @@ export const rulesConverters = new Map([
314315
["use-isnan", convertUseIsnan],
315316
["use-lifecycle-interface", convertUseLifecycleInterface],
316317
["use-pipe-decorator", convertUsePipeDecorator],
318+
["use-pipe-transform-interface", convertUsePipeTransformInterface],
317319
["variable-name", convertVariableName],
318320

319321
// These converters are all for rules that need more complex option conversions.

0 commit comments

Comments
 (0)