Skip to content

feat(eslint-config): resolve import aliases per theme from the project layout - #151

Closed
YvetteNikolov wants to merge 2 commits into
feat/project-layout-resolverfrom
feat/eslint-theme-aliases
Closed

YvetteNikolov wants to merge 2 commits into
feat/project-layout-resolverfrom
feat/eslint-theme-aliases

Conversation

@YvetteNikolov

Copy link
Copy Markdown
Contributor

Split from #144. Stacked on #150.

  • resolveImportAliases uses tryResolveThemeContext from shared-utils: every theme gets an @<theme>/scripts alias in brave-root, the local ./resources/scripts in theme-root.
  • @sage/scripts stays available; in projects without a sage theme it points at the default theme so starter code keeps resolving.
  • Unresolvable layouts keep the historical theme-root guess.
  • .cjs and .mjs files are linted with the JS rules (the shared resolver is a .cjs file).
  • Tests against the shared-utils fixtures.

…t layout

Every theme gets an @<theme>/scripts alias instead of only @sage/scripts.
In projects without a theme named sage the alias falls back to the default
theme so shared starter code keeps resolving. .cjs and .mjs files are now
linted too.
@YvetteNikolov
YvetteNikolov requested a review from a team as a code owner October 8, 2026 13:59
@YvetteNikolov
YvetteNikolov requested review from FreakyWizard, JasperS20, WybeBosch, Yannicvanveen, laravdiemen and rivanuff and removed request for a team October 8, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant