chore: effect pattern lint infrastructure (#35210)
This commit is contained in:
parent
1b88ff8d53
commit
1401901529
70 changed files with 524 additions and 234 deletions
14
script/ast-grep/rules/no-import-alias.yml
Normal file
14
script/ast-grep/rules/no-import-alias.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
id: no-import-alias
|
||||
language: TypeScript
|
||||
message: Do not alias value imports. For type name collisions, alias inside a dedicated `import type` statement.
|
||||
severity: error
|
||||
rule:
|
||||
all:
|
||||
- kind: import_specifier
|
||||
- has:
|
||||
field: alias
|
||||
kind: identifier
|
||||
- not:
|
||||
inside:
|
||||
pattern: import type { $$$SPECS } from "$MOD"
|
||||
stopBy: end
|
||||
Loading…
Add table
Add a link
Reference in a new issue