fix(*): apply token-var-usage stylelint rule#2959
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repo to adopt the @kong/design-tokens/token-var-usage stylelint rule by switching many SCSS token references from Sass variables (e.g. $kui-*) to CSS custom properties (var(--kui-*, $kui-*)), and bumps @kong/design-tokens to a version that contains the new rule.
Changes:
- Enable
@kong/design-tokens/token-var-usagestylelint rule (warning severity). - Bump
@kong/design-tokensfrom1.18.2to1.18.3-pr.613.e59423d.0across the monorepo + lockfile. - Refactor many Vue SFC / SCSS styles to use
var(--kui-*, $kui-*)for token usage.
Reviewed changes
Copilot reviewed 85 out of 86 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates locked @kong/design-tokens version and engine requirements for the new tokens package. |
| package.json | Bumps root devDependency @kong/design-tokens and normalizes JSON whitespace. |
| .stylelintrc.mjs | Enables the token-var-usage rule to start enforcing token CSS-var usage. |
| packages/portal/spec-renderer/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/portal/document-viewer/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-vaults/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-upstreams-targets/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-snis/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-shared/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-routes/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-redis-configurations/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-plugins/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-keys/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-gateway-services/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-data-plane-nodes/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-consumers/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-consumer-groups/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-consumer-credentials/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/entities/entities-certificates/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/split-pane/src/components/SplitToolbar.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/split-pane/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/sandbox-layout/src/components/SandboxNavigation.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/sandbox-layout/src/components/SandboxLayout.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/sandbox-layout/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/page-layout/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/monaco-editor/src/components/ToolbarActionButton.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/monaco-editor/src/components/MonacoEditorToolbar.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/monaco-editor/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/forms/src/components/forms/RLAForm.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/forms/OIDCForm.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldSelectionGroup.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldRadio.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldMetric.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldLabel.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldKeyValuePairs.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldInput.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldCheckbox.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldAutoSuggestLegacy.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldAutoSuggest.vue | Converts token usage to CSS vars with Sass fallback in component styles (and fixes a stray ;;). |
| packages/core/forms/src/components/fields/FieldArrayItem.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldArrayCardContainer.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/FieldArray.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/fields/AutoSuggest.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/RedisConfigSelect.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/RedisConfigCard.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/FormRedis.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/FormGroup.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/src/components/FormGenerator.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/forms/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/expressions/src/components/SupportText.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/RouterPlaygroundModal.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/RouterPlayground.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/RequestModal.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/RequestImportModal.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/RequestCard.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/PageHeader.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/src/components/ExpressionsEditor.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/expressions/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/error-boundary/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/entities-config-editor/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/documentation/src/components/ProductDocumentModal.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/documentation/src/components/DocumentationDisplay.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/documentation/src/components/DocumentationContent.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/documentation/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/core/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/core/app-layout/src/styles/variables/_app-sidebar.scss | Converts token usage to CSS vars with Sass fallback in shared SCSS variables/mixins. |
| packages/core/app-layout/src/styles/variables/_app-navbar.scss | Converts token usage to CSS vars with Sass fallback in shared SCSS variables. |
| packages/core/app-layout/src/styles/_base.scss | Converts base layout token usage to CSS vars with Sass fallback. |
| packages/core/app-layout/src/components/sidebar/SidebarToggle.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/sidebar/SidebarItem.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/sidebar/ItemBadge.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/sidebar/AppSidebar.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/pageInfoSection/AppPageInfoSection.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/pageHeader/AppPageHeader.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/navbar/AppNavbar.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/navbar/AccountDropdown.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/gradientBadge/GradientBadge.vue | Converts token usage to CSS vars with Sass fallback in component styles (incl. calc() padding). |
| packages/core/app-layout/src/components/errors/AppError.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/aboutSection/AppAboutSection.vue | Converts token usage to CSS vars with Sass fallback in component styles. |
| packages/core/app-layout/src/components/AppLayout.vue | Converts token usage to CSS vars with Sass fallback in component styles (incl. nested fallbacks). |
| packages/core/app-layout/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/analytics/dashboard-renderer/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/analytics/analytics-utilities/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/analytics/analytics-metric-provider/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/analytics/analytics-geo-map/package.json | Bumps @kong/design-tokens to the PR build version. |
| packages/analytics/analytics-chart/package.json | Bumps @kong/design-tokens to the PR build version. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 211 out of 213 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/entities-plugins/src/components/free-form/Datakit/flow-editor/node/NodePropertiesPanel.vue
Show resolved
Hide resolved
packages/analytics/analytics-chart/src/components/ZoomTimerange.vue
Outdated
Show resolved
Hide resolved
🔴 PR audit failed. 🔴🔥 PNPM Audit issues detected.PR with those issues cannot be merged. How to resolve:
🔥 PR preview packages detected .PR with those dependencies cannot be merged. 🔥 No test coverage detected.This PR does not include any test coverage changes, but it modifies source code. Please add appropriate tests to cover the changes made in this PR. If you believe this is a false positive or if there are valid reasons for not including test coverage changes, please request an exemption by adding the |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 230 out of 232 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Picking up
token-var-usagestylelint rule (Kong/design-tokens#613)