Skip to content

Multiple scoped shared configs require the prefix #2594

@MethodGrab

Description

@MethodGrab

ESLint v0.21.2
Relevant code: (#config.js#84)

Expected:

Multiple, scoped, shared configs in a single module should be extendable from a .eslintrc without the eslint-config- prefix (as non-scoped configs are).

Assuming a module called eslint-config-test with a default config index.js and a sub-config modern.js then all of these should work:

{ "extends": "@scope/eslint-config-test" }
{ "extends": "@scope/eslint-config-test/modern" }
{ "extends": "@scope/test" }
{ "extends": "@scope/test/modern" }

Actual:

The 4th example, extending a sub-config, will fail with the error Cannot find module '@scope/test/eslint-config-modern' unless the root module name includes the eslint-config- prefix.

These will work:

{ "extends": "@scope/test" }
{ "extends": "@scope/eslint-config-test/modern" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlycoreRelates to ESLint's core APIs and features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions