Add full shift mapping (old --bui-bg-neutral-1..4 → new --bui-bg-neutral-2..5)
to the changeset, ESLint rule docs, and PR description so adopters
understand the complete renaming of the neutral background scale.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Replace --bui-surface-1..5 with --bui-bg-neutral-1..5 for both light
and dark themes. --bui-bg-neutral-1 replaces the deprecated --bui-bg-app,
and --bui-bg-neutral-2..5 extend the scale. The old bare --bui-bg-neutral-1..4
entries are removed from the deprecated section since their names are now
reused; the hover/pressed/disabled variants remain deprecated.
Updates colors.stories.tsx, the ESLint rule and tests, and all migration
documentation and the PR description accordingly.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Group migrations by family (Surfaces, Foreground, Accent, Positive,
Negative, Warning, Announcement) and correct the surface token mappings
to match the full --bui-surface-1 through --bui-surface-5 scale.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Adds the missing documentation page at the URL referenced in the rule
meta, consistent with all other rules in the plugin. Includes incorrect/
correct code examples and a migration table mapping each deprecated token
to its semantic replacement.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Redesigns the BUI color token system in `@backstage/ui`:
- Adds a gray scale (`--bui-gray-1` through `--bui-gray-11`)
- Adds new foreground tokens with explicit hex values (primary, secondary, disabled, positive, negative, warning, announcement)
- Introduces five new semantic color families — Accent, Announcement, Warning, Negative, Positive — each with bg-base, bg-subdued, border, fg-on-base, and fg-on-subdued variants, for both light and dark themes
- Moves all legacy tokens (`--bui-bg-solid-*`, `--bui-bg-neutral-*`, `--bui-bg-danger/warning/success/info`, `--bui-fg-solid`, `--bui-fg-danger/success/info`, `--bui-border-*`, `--bui-shadow`) into a clearly marked `/* Deprecated tokens */` section in both light and dark themes
- Updates the Spotify theme overrides to use the new accent tokens and mark legacy overrides as deprecated
- Rewrites the `Colors` Storybook story to display all token families as a live, theme-aware reference grid
- Adds a new `@backstage/no-deprecated-bui-tokens` ESLint rule to `@backstage/eslint-plugin` that warns when any deprecated BUI token is referenced in JS/TS string literals; the rule is included in the `recommended` config so it applies to all plugin authors automatically
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
- `visitImports` now also reads `exportKind` so `export type { … } from`
statements are classified as type-only, fixing a false positive in the
self-import rule (and correctly skipping them in `no-undeclared-imports`
too).
- The reachability-graph regex in `no-self-package-imports` skips
`import type` / `export type` edges so files reachable only via
type-only re-exports aren't pulled into a runtime bundle and no longer
get false-positive same-entry errors.
- `SOURCE_EXTENSIONS` now includes `.mts` and `.cts` so entries and
barrels using those extensions are followed correctly.
- The ESLint plugin changeset wording matches the `error` severity of
the recommended config.
- Adds regression fixtures and RuleTester cases for `export type …` at
both entries and for a file only reachable via a type-only edge.
Signed-off-by: Marat Dyatko <maratd@spotify.com>
Made-with: Cursor
- Fixes the `Cannot access '_AppRootElementBlueprintesm' before
initialization` crash in `@backstage/frontend-plugin-api` caused by a
self-referential import in the packaged ESM.
- Cleans up similar self-imports in `@backstage/catalog-model`,
`@backstage/core-plugin-api`, `@backstage/plugin-catalog-node`,
`@backstage/plugin-kubernetes-common`, and
`@backstage/plugin-kubernetes-node`. Value imports switch to relative
paths; type-only imports use `import type` so they're erased at
runtime.
- Adds a new `@backstage/no-self-package-imports` ESLint rule. It reads
each package's `exports` map, traverses the relative import graph from
every entry's source file, and only reports imports where the current
file is in the same bundle as the target entry (same-entry). Files
that aren't reachable from any entry (tests, scripts, orphans) are
skipped. `import type`, `package.json` imports, and cross-entry
self-imports are allowed by default; cross-entry can be opted into
with `allowCrossEntry: false`.
Signed-off-by: Marat Dyatko <maratd@spotify.com>
Made-with: Cursor
TypeScript 6.0 no longer applies bivariant checking to method-shorthand
functions that don't reference `this`. This causes the `fix` callbacks in
suggestion descriptors to fail type checking when they return `void`
instead of a valid `Fix | null` value.
- Return `null` from non-fixable suggestion `fix` handlers
- Add explicit `SuggestionReportDescriptor[]` type annotation to `suggest`
- Remove redundant `@param` JSDoc annotations now covered by the array type
Signed-off-by: Jon Koops <jonkoops@gmail.com>
allow frontend plugins to import from other frontend plugins with same
plugin id to allow plugin overrides without unnecessary eslint warning.
relates to #31372
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
removed default exclude targets so that tests are also in the scope.
added new includedFiles option that defaults to all in src/ directories
added more ignored packages to local config to make this pass, needs
fixes later on
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
basically verify-local-dependencies.js but done during linting also in
the 3rd party repositories.
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>