โก Performance tips
Depending on the device you are operating on, in-editor performance can be a concern with Sheriff.
@typescript-eslint
can be particularly taxing on the system, so, some performance considerations are in order.
Rules performance benchmarkingโ
The currently known slowest rules in Sheriff are the ones of @typescript-eslint
that requires type information to work.
You can benchmark rules performance by yourself by running the following command in the terminal:
- npm
- Yarn
- pnpm
TIMING=1 npm run eslint
TIMING=1 yarn eslint
TIMING=1 pnpm run eslint
Learn more in the ESLint official docs section.
Rules performance optimization strategiesโ
There are a few techniques you can leverage to improve slow linting time.
You can choose which technique to employ or mix-and-match them.