Skip to content

Latest commit

 

History

History
 
 

website-eslint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

website-eslint

A bundled version of ESLint plus typescript-eslint, made to work in a browser. This is exclusively used for the playground in the website package.

Building

yarn build runs build.ts, which uses ESBuild to create a CommonJS bundle including:

  • ESLint's Linter class and built-in rules
  • A wrapper that causes TypeScript's typescript and typescript/lib/tsserverlibrary module entry points to be downloaded on the fly
  • typescript-eslint packages, including:
    • @typescript-eslint/eslint-plugin and all its configs and rules
    • @typescript-eslint/parser and @typescript-eslint/typescript-estree

The build files intentionally use deep /use-at-your-own-risk imports into our packages. This is so that esbuild can properly tree-shake and only include the necessary code. This saves us having to mock unnecessary things and reduces our website bundle size.