Skip to content

Conversation

D4N14L
Copy link
Member

@D4N14L D4N14L commented Sep 25, 2023

Summary

Allows resolution of extended shareable configurations even when the package they are sourced from is not prefixed with eslint-config-.

Details

In order to allow use of ESLint configurations provided via Heft rigs, we need to allow consumption of configurations from packages not prefixed with eslint-config-, since Heft rigs obviously do not have the same naming restrictions.

The solution first attempts to resolve using the default logic, and falls back to attempting to resolve using the provided extended config name directly, without modification. This is done to allow for backwards-compatibility with intentionally short-named extended configs (cases where the prefix is intentionally omitted), since ESLint prefixes the eslint-config- to the package name during normalization if it was not found. For example, if @rushstack was specified as an extends configuration, then it would normally resolve to @rushstack/eslint-config.

How it was tested

Tested using resolution logic in Rushstack by moving the ESLint configuration into the rig. A future change will transition Rushstack to use the @rushstack/eslint-config package via @rushstack/heft-node-rig/@rushstack/heft-web-rig/local-node-rig/local-web-rig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants