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

Enhancement: Support Lazy Loading Rules #11029

Open
Labels
blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIenhancementNew feature or request
@mr-sanders

Description

@mr-sanders

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

eslint-plugin

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

I propose the addition of lazy loading support for rule definitions. As the number of rules grows, it becomes increasingly inefficient to load them all at once. Currently, all rules are loaded eagerly, which can lead to unnecessary memory usage and slower startup times, especially for configurations that use only a subset of rules (e.g., non-type-checking). Additionally, the lack of this mechanism breaks the lazy loading already implemented in the ESLint repository - all rules in the current repository that use the getESLintCoreRule utility eagerly load core rules.

Additional Info

ESLint Config

importtseslintfrom'typescript-eslint';exportdefaulttseslint.config({files:['**/*.ts'],extends:[tseslint.configs.base],});

eslint ./index.ts --debug

Expected Result

no eslint rules loaded

Actual Result

  ...  eslint:rules Loading rule'consistent-return' (remaining=289) +0ms  eslint:rules Loading rule'dot-notation' (remaining=288) +13ms  eslint:rules Loading rule'init-declarations' (remaining=287) +5ms  eslint:rules Loading rule'max-params' (remaining=286) +1ms  eslint:rules Loading rule'no-dupe-class-members' (remaining=285) +16ms  eslint:rules Loading rule'no-empty-function' (remaining=284) +4ms  eslint:rules Loading rule'no-invalid-this' (remaining=283) +10ms  eslint:rules Loading rule'no-loop-func' (remaining=282) +1ms  eslint:rules Loading rule'no-loss-of-precision' (remaining=281) +1ms  eslint:rules Loading rule'no-magic-numbers' (remaining=280) +1ms  eslint:rules Loading rule'no-restricted-imports' (remaining=279) +15ms  eslint:rules Loading rule'no-unused-expressions' (remaining=278) +32ms  eslint:rules Loading rule'no-useless-constructor' (remaining=277) +2ms  eslint:rules Loading rule'prefer-destructuring' (remaining=276) +7ms  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIenhancementNew feature or request

    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