mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
Update the @typescript-eslint - eslint-plugin and parser to v7.18.0 cia incremental patches. This is the last version before breaking changes need to start be applied to the infrastructure. Needed to update EsLint to v8.56.0 as required by the above major v7. Only one new error was uncovered in test file and fixed. No-Presubmit: true Bug: none Change-Id: I4e4fe265b82deeb49786c5bf3e154dac8fcfecbd Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6054130 Reviewed-by: Danil Somsikov <dsv@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
The following selectors are supported:
- AST node type:
ForStatement - wildcard:
* - attribute existence:
[attr] - attribute value:
[attr="foo"]or[attr=123] - attribute regex:
[attr=/foo.*/]or (with flags)[attr=/foo.*/is] - attribute conditions:
[attr!="foo"],[attr>2],[attr<3],[attr>=2], or[attr<=3] - nested attribute:
[attr.level2="foo"] - field:
FunctionDeclaration > Identifier.id - First or last child:
:first-childor:last-child - nth-child (no ax+b support):
:nth-child(2) - nth-last-child (no ax+b support):
:nth-last-child(1) - descendant:
ancestor descendant - child:
parent > child - following sibling:
node ~ sibling - adjacent sibling:
node + adjacent - negation:
:not(ForStatement) - has:
:has(ForStatement) - matches-any:
:matches([attr] > :first-child, :last-child) - subject indicator:
!IfStatement > [name="foo"] - class of AST node:
:statement,:expression,:declaration,:function, or:pattern
