Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13583e6

Browse files
author
Josh Goldberg
authored
docs: replace astexplorer.net links with playground (typescript-eslint#4376)
1 parent 899ed4c commit 13583e6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/development/architecture/ASTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,14 @@ ESLint uses an AST format known as **[`estree`]**.
4141
ESTree is more broadly used than just for ESLint -- it is the de facto community standard.
4242
ESLint's built-in parser that outputs an `estree`-shaped AST is also a separate package, called **[`espree`]**.
4343

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+
4449
:::note
4550

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).
4752

4853
:::
4954

docs/development/architecture/PACKAGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ESTree is unoptimized and intended for "general purpose" use-cases of traversing
3232
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).
3333

3434
:::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_.
3636
:::
3737

3838
## `@typescript-eslint/typescript-estree`

docs/linting/TROUBLESHOOTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ See [#2041](https://github.com/typescript-eslint/typescript-eslint/issues/2041)
6767
ESLint core contains the rule [`no-restricted-syntax`](https://eslint.org/docs/rules/no-restricted-syntax).
6868
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.
6969

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.
7171

7272
For example, you can ban enums (or some variation of) using one of the following configs:
7373

0 commit comments

Comments
 (0)