Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tests: Reduce the giant number of naming-convention tests #9691

Open
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

The auto-generated naming-convention tests are by far the slowest part of packages/eslint-plugin. We've done work in the past to speed them up:

...but they still take >10 seconds for some files on the Windows CI jobs. Example from https://github.com/typescript-eslint/typescript-eslint/actions/runs/10184575611/job/28172431302?pr=9165:

 PASS  tests/index.test.ts (312 MB heap size)
 PASS  tests/rules/naming-convention/cases/accessor.test.ts (19.277 s, 880 MB heap size)
 PASS  tests/rules/naming-convention/cases/method.test.ts (37.199 s, 281 MB heap size)
 PASS  tests/areOptionsValid.test.ts (185 MB heap size)
 PASS  tests/rules/naming-convention/cases/default.test.ts (20.911 s, 485 MB heap size)
 PASS  tests/rules/naming-convention/cases/property.test.ts (31.41 s, 677 MB heap size)
 PASS  tests/rules/naming-convention/cases/autoAccessor.test.ts (15.2 s, 484 MB heap size)
 PASS  tests/rules/naming-convention/cases/classicAccessor.test.ts (17.029 s, 328 MB heap size)
 PASS  tests/rules/naming-convention/cases/parameter.test.ts (15.839 s, 320 MB heap size)
 PASS  tests/eslint-rules/prefer-const.test.ts (180 MB heap size)

Let's see if we can shrink those tests down to be less explosively many.

💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuerepo maintenancethings to do with maintenance of the repo, and not with code/docstestsanything to do with testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions