Skip to content

Commit e9942b9

Browse files
author
Josh Goldberg
authored
1 parent eb3a81b commit e9942b9

File tree

3 files changed

+32
-0
lines changed

3 files changed

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

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 { convertNoOutputNative } from "./converters/codelyzer/no-output-native";
156156
import { convertNoOutputOnPrefix } from "./converters/codelyzer/no-output-on-prefix";
157157
import { convertNoOutputsMetadataProperty } from "./converters/codelyzer/no-outputs-metadata-property";
158+
import { convertNoPipeImpure } from "./converters/codelyzer/no-pipe-impure";
158159
import { convertNoQueriesMetadataProperty } from "./converters/codelyzer/no-queries-metadata-property";
159160
import { convertPreferOutputReadonly } from "./converters/codelyzer/prefer-output-readonly";
160161
import { convertRelativeUrlPrefix } from "./converters/codelyzer/relative-url-prefix";
@@ -264,6 +265,7 @@ export const rulesConverters = new Map([
264265
["no-outputs-metadata-property", convertNoOutputsMetadataProperty],
265266
["no-parameter-properties", convertNoParameterProperties],
266267
["no-parameter-reassignment", convertNoParameterReassignment],
268+
["no-pipe-impure", convertNoPipeImpure],
267269
["no-queries-metadata-property", convertNoQueriesMetadataProperty],
268270
["no-redundant-jsdoc", convertNoRedundantJsdoc],
269271
["no-reference-import", convertNoReferenceImport],

0 commit comments

Comments
 (0)