d38977c7b4
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>
43 lines
1.8 KiB
JavaScript
43 lines
1.8 KiB
JavaScript
/*
|
|
* Copyright 2023 The Backstage Authors
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
module.exports = {
|
|
configs: {
|
|
recommended: {
|
|
plugins: ['@backstage'],
|
|
rules: {
|
|
'@backstage/no-forbidden-package-imports': 'error',
|
|
'@backstage/no-relative-monorepo-imports': 'error',
|
|
'@backstage/no-undeclared-imports': 'error',
|
|
'@backstage/no-mixed-plugin-imports': 'warn',
|
|
'@backstage/no-ui-css-imports-in-non-frontend': 'error',
|
|
'@backstage/no-self-package-imports': 'error',
|
|
'@backstage/no-deprecated-bui-tokens': 'warn',
|
|
},
|
|
},
|
|
},
|
|
rules: {
|
|
'no-forbidden-package-imports': require('./rules/no-forbidden-package-imports'),
|
|
'no-relative-monorepo-imports': require('./rules/no-relative-monorepo-imports'),
|
|
'no-undeclared-imports': require('./rules/no-undeclared-imports'),
|
|
'no-top-level-material-ui-4-imports': require('./rules/no-top-level-material-ui-4-imports'),
|
|
'no-mixed-plugin-imports': require('./rules/no-mixed-plugin-imports'),
|
|
'no-ui-css-imports-in-non-frontend': require('./rules/no-ui-css-imports-in-non-frontend'),
|
|
'no-self-package-imports': require('./rules/no-self-package-imports'),
|
|
'no-deprecated-bui-tokens': require('./rules/no-deprecated-bui-tokens'),
|
|
},
|
|
};
|