Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docs: add an FAQ section about eslint TIMING/--stats and type-aware rules being misleading #9315

Closed
Assignees
JoshuaKGoldberg
Labels
documentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.performanceIssues regarding performanceteam assignedA member of the typescript-eslint team should work on this.
@bradzacher

Description

@bradzacher

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

ESLint allows you to profile your lint run with the TIMING=1 env var1. Alternately it provides the--stats flag to do a similar thing in a JSON form2.

These flags are great debug tools for non-type-aware rules. But they're mostly useless for type-aware rules because types are computed lazily and cached. This means that the first type-aware rule that runs will bear the brunt of doing the "pre-cached" calculations and then folllowing rules mostly just read from the caches and do little work in comparison.

This can actually paint a misleading and harmful picturebecause people will read the times and think a particular rule is much slower than it is in reality and sometimes people will turn off a rule thinking it was the cause of slowness.

We should have an FAQ section about this so we can help inform people to not trust the output for type-aware rules.

Affected URL(s)

Faq

Footnotes

  1. https://eslint.org/docs/latest/extend/custom-rules#profile-rule-performance

  2. https://eslint.org/docs/latest/extend/stats

Metadata

Metadata

Labels

documentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.performanceIssues regarding performanceteam assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp