Skip to content

Commit

Permalink
fix: enable token validation
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven committed Dec 31, 2023
1 parent 16e3385 commit f1808ce
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 30 deletions.
41 changes: 17 additions & 24 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,25 @@ module.exports = {
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue/scss'
],
overrides: [
{
files: [
'**/*.vue',
'**/*.scss'
],
rules: {
'unit-disallowed-list': [
['rem', 'em'],
],
// Only allow @kong/design-tokens or `--kong-ui-*` CSS custom properties
'custom-property-pattern': [
"^(kui-).+$",
{
message: "Expected custom property \"%s\" to be sourced from @kong/design-tokens with prefix '--kui-'",
}
],
// Disable the following rules
'custom-property-no-missing-var-function': null,
'no-descending-specificity': null,
}
}
],
plugins: [
'stylelint-order',
'@kong/design-tokens/stylelint-plugin',
],
rules: { 'order/properties-alphabetical-order': true }
rules: {
'order/properties-alphabetical-order': true,
'unit-disallowed-list': [
['rem', 'em'],
],
// Only allow @kong/design-tokens or `--kong-ui-*` CSS custom properties
'custom-property-pattern': [
"^(kui-).+$",
{
message: "Expected custom property \"%s\" to be sourced from @kong/design-tokens with prefix '--kui-'",
}
],
'@kong/design-tokens/use-proper-token': true,
// Disable the following rules
'custom-property-no-missing-var-function': null,
'no-descending-specificity': null,
}
}
1 change: 0 additions & 1 deletion sandbox/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<MarkdownUi
v-model="content"
:editable="editable"
mode="split"
theme="light"
@cancel="cancelEdit"
@mode="modeChanged"
Expand Down
4 changes: 2 additions & 2 deletions src/components/MarkdownContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ $header-anchor-offset-top: calc(var(--kui-space-80, $kui-space-80) + 2px);
@include toolbar-button;
color: var(--kui-color-text-neutral-weak, $kui-color-text-neutral-weak);
position: absolute;
right: var(--kui-space-20, $kui-space-20);
top: var(--kui-space-20, $kui-space-20);
right: 4px;
top: 4px;
}
.line.highlighted {
Expand Down
4 changes: 2 additions & 2 deletions src/components/MarkdownUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ const markdownEditorMaxHeight = computed((): string => `${props.editorMaxHeight}
.edit-button {
position: absolute;
right: 0;
top: 0;
right: 4px;
top: 4px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/toolbar/MarkdownToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ onMounted(() => {
}
.toolbar-divider {
background-color: var(--kui-color-border, $kui-color-border);
background-color: var(--kui-color-background-disabled, $kui-color-background-disabled);
height: 16px;
margin: var(--kui-space-0, $kui-space-0) var(--kui-space-20, $kui-space-20);
width: 2px;
Expand Down

0 comments on commit f1808ce

Please sign in to comment.