Skip to content

Commit

Permalink
fix: stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven committed Jun 21, 2024
1 parent 93eb397 commit 0f55571
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 39 deletions.
38 changes: 0 additions & 38 deletions .stylelintrc.cjs

This file was deleted.

27 changes: 27 additions & 0 deletions .stylelintrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export default {
extends: [
'stylelint-config-html',
'stylelint-config-recommended-scss',
'stylelint-config-recommended-vue/scss',
],
plugins: [
'stylelint-order',
'@kong/design-tokens/stylelint-plugin',
'@stylistic/stylelint-plugin',
],
rules: {
'order/properties-alphabetical-order': true,
'@kong/design-tokens/use-proper-token': true,
'@stylistic/indentation': [2, { baseIndentLevel: 0 }],
// 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-'",
},
],
'custom-property-no-missing-var-function': true,
// Disable the following rules
'no-descending-specificity': null,
},
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"@kong/eslint-config-kong-ui": "^1.1.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@stylistic/stylelint-plugin": "^2.1.2",
"@types/inquirer": "^9.0.7",
"@types/node": "^20.14.2",
"@types/sortablejs": "^1.15.8",
Expand Down
26 changes: 25 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0f55571

Please sign in to comment.