Skip to content

Repo: Test to ensure that the ESLint plugin object is circularly referenced in the configs #12555

Description

@kirkwaiblinger

AI Assistance

Suggestion

In #12437 (comment), we experimented with some ideas around how the exports from the eslint-plugin package work. One of the ideas violated the very important invariant that all of the following must be equal, but we noticed this didn't fail any tests:

import tseslint from 'typescript-eslint';
import eslintPlugin from '@typescript-eslint/eslint-plugin';

tseslint.plugin;
eslintPlugin;
tseslint.configs['whatever'].plugins['@typescript-eslint'];

Therefore, we attempted to write testing that would enforce this invariant, but ran into unexpected problems with vitest, so we decided to defer it; see #12437 (comment). This issue is to follow up and write working testing.

cc @StyleShit

Additional Info

No response

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