Skip to content

Commit 333a5ec

Browse files
docs: add selector tips to lint plugins (#1466)
Co-authored-by: Jo Franchetti <[email protected]>
1 parent 9641244 commit 333a5ec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

runtime/reference/lint_plugins.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@ supported syntax for selectors is:
133133
| `:not(> Bar)` | Not pseudo-class |
134134
| `:is(> Bar)` | Is pseudo-class |
135135

136+
There is also the `:exit` pseudo that is only valid at the end of the whole
137+
selector. When it's present, Deno will call the function while going **up** the
138+
tree instead of when going down.
139+
140+
:::tip
141+
142+
We highly recommend using the
143+
[typescript-eslint playground](https://typescript-eslint.io/play/) when
144+
developing lint rules. It allows you to inspect code and the resulting AST
145+
format. This makes it easier to see which selectors match which node.
146+
147+
:::
148+
136149
## Applying fixes
137150

138151
A custom lint rule can supply a function to apply a fix when reporting a

0 commit comments

Comments
 (0)