116 Commits

Author SHA1 Message Date
Charles de Dreuille a4f2c56110 Bring back correct neutral tokens
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-05-29 15:59:39 +02:00
Charles de Dreuille 9f1dd4ae9b docs(ui): expand neutral background migration notes
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>
2026-05-27 13:14:30 +02:00
Charles de Dreuille 657aad6cf0 refactor(ui): rename surface tokens to neutral background tokens
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>
2026-05-27 13:11:38 +02:00
Charles de Dreuille 9c3b5ef2bd Update no-deprecated-bui-tokens.js
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-05-26 21:45:34 +02:00
Charles de Dreuille 27891fda91 docs(eslint-plugin): use ### headings for migration sections in no-deprecated-bui-tokens docs
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-05-26 21:45:02 +02:00
Charles de Dreuille 53388ccb5e docs(eslint-plugin): fix migration table in no-deprecated-bui-tokens docs
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>
2026-05-26 21:43:50 +02:00
Charles de Dreuille d80062d18e docs(eslint-plugin): add docs page for no-deprecated-bui-tokens rule
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>
2026-05-26 15:49:06 +02:00
Charles de Dreuille ae87db249a test(eslint-plugin): add RuleTester tests for no-deprecated-bui-tokens
Covers plain string literals, template literals, multiple tokens in one
string, non-deprecated --bui-* tokens (valid cases), and JSX inline
style attribute usage.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-05-26 15:46:15 +02:00
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
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
github-actions[bot] 7295193bb6 Version Packages (next) 2026-04-28 15:53:09 +00:00
Marat Dyatko f1e26b8ed7 Address review feedback on no-self-package-imports rule
- `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
2026-04-23 16:28:20 +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
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
github-actions[bot] a2cb332e25 Version Packages (next) 2026-03-31 15:30:51 +00:00
Jon Koops df43b0e149 fix(eslint-plugin): fix TypeScript 6.0 type errors in no-mixed-plugin-imports
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>
2026-03-26 12:31:11 +01:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
dependabot[bot] 6738cf0842 build(deps): bump minimatch from 9.0.5 to 10.2.1 (#32915)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 9.0.5 to 10.2.1.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v9.0.5...v10.2.1)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 10.2.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:58:00 +01:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
github-actions[bot] 792f4d7e3d Version Packages 2025-11-18 12:23:09 +00:00
github-actions[bot] 807af8ce0e Version Packages (next) 2025-10-21 16:14:43 +00: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
github-actions[bot] d6ce2db9ca Version Packages 2025-10-14 15:29:54 +00:00
Fredrik Adelöw 5e98e613b5 Fix a bunch of vale errors
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-10-13 20:40:59 +02:00
Hellgren Heikki cba3cd5203 chore(eslint): add same plugin id suggestion
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-10-10 16:54:01 +03:00
Hellgren Heikki a1dae7180d feat(eslint): relax frontend imports for nfs
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>
2025-10-09 15:40:46 +03:00
github-actions[bot] 58558ef2c1 Version Packages 2025-06-17 12:45:56 +00:00
Hellgren Heikki 2974c08619 fix: review findings
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>
2025-06-16 22:38:45 +03: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 e84e7c55bf feat: add suggestions for fixes for mixed plugins rule
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-06-16 22:11:21 +03:00
Hellgren Heikki 2788a08dad fix: tsc errors and rest of the tests
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
github-actions[bot] 9c9faf2ec1 Version Packages (next) 2025-06-11 10:06:10 +00:00
Gabriel Dugny 098ef95bfe fix: slow eslint
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2025-06-10 17:14:00 +02:00
Axel Hecht a904b605aa Update existing knip-report files
Also remove a stray one

Signed-off-by: Axel Hecht <axel@pike.org>
2025-01-20 15:32:35 +01:00
github-actions[bot] a9c095d0be Version Packages 2024-10-15 10:25:03 +00:00
github-actions[bot] 56a811849a Version Packages (next) 2024-10-08 11:42:14 +00:00
Fredrik Adelöw 14e253001e Merge pull request #26919 from backstage/freben/mui-grid
exclude the data-grid package from the imports rule
2024-10-07 11:16:53 +02:00
Fredrik Adelöw b1c2a2dbaf exclude the data-grid package from the imports rule
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-10-01 11:41:51 +02:00
github-actions[bot] c42c710982 Version Packages (next) 2024-10-01 09:20:36 +00:00
Fredrik Adelöw 63963f6c2b fixup
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-09-27 15:08:51 +02:00
github-actions[bot] 698adeb1ea Version Packages 2024-09-17 13:19:01 +00:00
github-actions[bot] 47358815d6 Version Packages (next) 2024-09-10 13:56:19 +00:00
Patrik Oldsberg 434b9c19db Update packages/eslint-plugin/rules/no-undeclared-imports.js
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-09-09 20:10:56 +02:00
Patrik Oldsberg 08895e3f84 eslint-plugin: add support for inline packages
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-09-04 19:36:18 +03:00
Patrik Oldsberg e910e572e0 Revert "added the frontend-extensions package role"
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2024-08-13 14:47:00 +02:00
Fredrik Adelöw 705794def5 rename the role to frontend-extensions
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-08-12 11:10:54 +02:00