8000 docs: add website-eslint README.md (#9873) · abrahamguo/typescript-eslint@8b1eb00 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b1eb00

Browse files
docs: add website-eslint README.md (typescript-eslint#9873)
* docs(website-eslint): add README.md * On-the-fly typescript * Update packages/website/README.md Co-authored-by: Joshua Chen <sidachen2003@gmail.com> * wrong url --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
1 parent 5fd4251 commit 8b1eb00

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

packages/website-eslint/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# `website-eslint`
2+
3+
A bundled version of ESLint plus `typescript-eslint`, made to work in a browser.
4+
This is exclusively used for the playground in the [`website` package](../website/README.md).
5+
6+
## Building
7+
8+
`yarn build` runs `build.ts`, which uses ESBuild to create a CommonJS bundle including:
9+
10+
- ESLint's [`Linter` class](https://eslint.org/docs/latest/integrate/nodejs-api#linter) and built-in rules
11+
- A wrapper that causes TypeScript's `typescript` and `typescript/lib/tsserverlibrary` module entry points to be downloaded on the fly
12+
- This uses the same source as the [TypeScript playground](https://typescriptlang.org/play), giving us a "Monaco web" compatible bundle
13+
- typescript-eslint packages, including:
14+
- `@typescript-eslint/eslint-plugin` and all its configs and rules
15+
- `@typescript-eslint/parser` and `@typescript-eslint/typescript-estree`
16+
17+
The build files intentionally use deep `/use-at-your-own-risk` imports into our packages.
18+
This is so that esbuild can properly tree-shake and only include the necessary code.
19+
This saves us having to mock unnecessary things and reduces our website bundle size.

packages/website/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Netlify Status](https://api.netlify.com/api/v1/badges/128d21c7-b2fe-45ad-b141-9878fcf5de3a/deploy-status)](https://app.netlify.com/sites/typescript-eslint/deploys)
44

5-
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
5+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
66

77
## Installation
88

0 commit comments

Comments
 (0)
0