You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/architecture/ASTS.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,9 +41,14 @@ ESLint uses an AST format known as **[`estree`]**.
41
41
ESTree is more broadly used than just for ESLint -- it is the de facto community standard.
42
42
ESLint's built-in parser that outputs an `estree`-shaped AST is also a separate package, called **[`espree`]**.
43
43
44
+
## AST Playground
45
+
46
+
The [TypeScript ESLint playground](https://typescript-eslint.io/play#showAST=es) contains an AST explorer that generates an interactive AST for any code entered into the playground.
47
+
You can activate it under _Options_ > _AST Explorer_ on its left sidebar by selecting _ESTree_.
48
+
44
49
:::note
45
50
46
-
You can play more with various ASTs such as ESTree on [astexplorer.net] and read more details on their [Wikipedia article](https://en.wikipedia.org/wiki/Abstract_syntax_tree).
51
+
You can play more with various other ASTs on [astexplorer.net] and read more details on their [Wikipedia article](https://en.wikipedia.org/wiki/Abstract_syntax_tree).
Copy file name to clipboardExpand all lines: docs/development/architecture/PACKAGES.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ ESTree is unoptimized and intended for "general purpose" use-cases of traversing
32
32
See more on configuring custom parsers with ESLint on [ESLint's User Guide > Configuring > Plugins](https://eslint.org/docs/user-guide/configuring/plugins#specifying-parser).
33
33
34
34
:::tip
35
-
You can select `@typescript-eslint/parser` on [astexplorer.net](https://astexplorer.net)'s top-middle ⚙ dropdown that defaults to Acorn.
35
+
You can select `@typescript-eslint/parser` on the [TypeScript ESLint playground](https://typescript-eslint.io/play#showAST=es)'s left sidebar under _Options_ > _AST Explorer_ by selecting _ESTree_.
Copy file name to clipboardExpand all lines: docs/linting/TROUBLESHOOTING.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ See [#2041](https://github.com/typescript-eslint/typescript-eslint/issues/2041)
67
67
ESLint core contains the rule [`no-restricted-syntax`](https://eslint.org/docs/rules/no-restricted-syntax).
68
68
This generic rule allows you to specify a [selector](https://eslint.org/docs/developer-guide/selectors) for the code you want to ban, along with a custom error message.
69
69
70
-
You can use a tool like [AST Explorer](https://astexplorer.net/) to help in figuring out the structure of the AST that you want to ban.
70
+
You can use an AST visualization tool such as [TypeScript ESLint playground](https://typescript-eslint.io/play#showAST=es) > _Options_ > _AST Explorer_ on its left sidebar by selecting _ESTree_ to help in figuring out the structure of the AST that you want to ban.
71
71
72
72
For example, you can ban enums (or some variation of) using one of the following configs:
0 commit comments