Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add codelyzer use-pipe-decorator converter (#460)
- Loading branch information
1 parent
8c4a3bd
commit 7e3bd82
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/rules/converters/codelyzer/tests/use-pipe-decorator.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { convertUsePipeDecorator } from "../use-pipe-decorator"; | ||
|
||
describe(convertUsePipeDecorator, () => { | ||
test("conversion without arguments", () => { | ||
const result = convertUsePipeDecorator({ | ||
ruleArguments: [], | ||
}); | ||
|
||
expect(result).toEqual({ | ||
rules: [ | ||
{ | ||
ruleName: "@angular-eslint/use-pipe-decorator", | ||
}, | ||
], | ||
plugins: ["@angular-eslint/eslint-plugin"], | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { RuleConverter } from "../../converter"; | ||
|
||
export const convertUsePipeDecorator: RuleConverter = () => { | ||
return { | ||
rules: [ | ||
{ | ||
ruleName: "@angular-eslint/use-pipe-decorator", | ||
}, | ||
], | ||
plugins: ["@angular-eslint/eslint-plugin"], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters