-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tools): adjust eslint rule generator
- Loading branch information
1 parent
f2900a2
commit 81a783f
Showing
3 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
tools/workspace-plugin/src/generators/eslint-rule/files/__name__.spec.ts__tmpl__
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,9 @@ | ||
import { RuleTester } from '@typescript-eslint/rule-tester'; | ||
import { rule, RULE_NAME } from './<%= name %>'; | ||
|
||
const ruleTester = new RuleTester(); | ||
|
||
ruleTester.run(RULE_NAME, rule, { | ||
valid: [`const example = true;`], | ||
invalid: [], | ||
}); |
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
12 changes: 11 additions & 1 deletion
12
tools/workspace-plugin/src/generators/eslint-rule/generator.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