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

Skip to content

Repo: Stop testing eslint-plugin with both project and projectService? #11676

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

Ever since #6754, we've tested run unit tests for eslint-plugin, eslint-plugin-internal, and typescript-estree both with parserOptions.project and parserOptions.projectService:

matrix:
package:
['eslint-plugin', 'eslint-plugin-internal', 'typescript-estree']

run: yarn nx test ${{ matrix.package }} --coverage=false
env:
CI: true
TYPESCRIPT_ESLINT_PROJECT_SERVICE: true

Doing so gives us coverage to make sure that rule behaviors don't differ unexpectedly between the two. That coverage was especially useful in the early days of projectService, when we weren't able to be as confident it was an equivalent to project.

However, that double-testing comes with two downsides:

Now that projectService has been stable for a while, I'd like to propose we:

  • Remove 'eslint-plugin' from the matrix for TYPESCRIPT_ESLINT_PROJECT_SERVICE: true
  • Default its rule tests to always use projectService: true by default...
  • ...except when they customize the project, in which case they'll stick with project settings

Note that 'eslint-plugin-internal' and 'typescript-estree' would still both be tested with both project and projectService.

What do we think? Is this safe enough to do now / is leaving in project-customized eslint-plugin rule tests + the two other packages enough coverage?

Additional Info

See also #11204 for tracking CI performance improvements.

💖

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/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions