Skip to content

Commit 937bd13

Browse files
authored
Merge pull request #52 from canac/import-order-plugin
fix: explicitly import stylelint-order package
2 parents 5e5cf44 + 8f7258f commit 937bd13

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"semantic-release": "^25.0.2",
5959
"stylelint": "^16.26.0",
6060
"stylelint-order": "^7.0.0",
61+
"typescript": "^5.9.3",
6162
"vitest": "^4.0.13"
6263
},
6364
"peerDependencies": {

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import order from 'stylelint-order'
2+
13
import { appearance } from './groups/appearance.ts'
24
import { boxModel } from './groups/box-model.ts'
35
import { interaction } from './groups/interaction.ts'
@@ -31,7 +33,7 @@ const EMPTY_LINE_MINIMUM_PROPERTY_THRESHOLD = 5
3133
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Let return type be inferred.
3234
export function getConfig({ severity }: { severity: 'error' | 'warning' }) {
3335
return {
34-
plugins: ['stylelint-order'],
36+
plugins: [order],
3537
rules: {
3638
'declaration-empty-line-before': [
3739
'always',

src/stylelint-order.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module 'stylelint-order' {
2+
import type { Plugin } from 'stylelint'
3+
4+
const plugin: Plugin
5+
export default plugin
6+
}

0 commit comments

Comments
 (0)