10 Commits

Author SHA1 Message Date
Charles de Dreuille d38977c7b4 feat(ui): introduce semantic color token families and deprecate legacy tokens
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>
2026-05-26 15:08:53 +02:00
Marat Dyatko ab1cdbb9db Fix circular self-imports and add no-self-package-imports lint rule
- 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
2026-04-23 14:43:01 +02:00
Patrik Oldsberg 926389b38c eslint-plugin: add lint rule to ensure BUI CSS is not imported in plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-10-17 19:42:30 +02:00
Hellgren Heikki 0a254aa6a0 chore: make mixed plugin imports warning instead error
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-06-16 22:11:21 +03:00
Hellgren Heikki 063b2d39ce feat: eslint rule to check forbidden plugin imports
basically verify-local-dependencies.js but done during linting also in
the 3rd party repositories.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-06-16 22:11:20 +03:00
Andre Wanlin 37867e0c2c Renamed based on feedback
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2024-01-13 14:47:02 -06:00
Andre Wanlin 995d2809b8 Added new @backstage/no-top-level-mui4-imports rule
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2024-01-13 14:47:02 -06:00
Patrik Oldsberg 4753d26b94 eslint-plugin: add no-relative-monorepo-imports rule
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 16:42:23 +01:00
Patrik Oldsberg 4d05d5bf83 eslint-plugin: refactor to ES2021 and add no-undeclared-imports rule
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 14:43:47 +01:00
Patrik Oldsberg 179d301518 added eslint-plugin
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2023-02-03 14:43:36 +01:00