Skip to content

Commit

Permalink
feat: Support StyleLint 16 (#27)
Browse files Browse the repository at this point in the history
* Update package.json with build script and module exports

* Refactor code and add rollup configuration

* Fix paths
  • Loading branch information
Tsuyoshi84 authored Jan 2, 2024
1 parent 54627de commit 16403c0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check

module.exports = {
export default {
plugins: 'stylelint-order',
rules: {
'order/properties-order': [order(), { unspecified: 'bottomAlphabetical', severity: 'warning' }],
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@
"engines": {
"node": ">=18"
},
"main": "index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"type": "module",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"scripts": {
"build": "rollup -c rollup.config.js",
"lint": "biome check index.js",
"stylelint": "stylelint --max-warnings 0 ./test/test.css",
"format": "biome format --write index.js",
Expand All @@ -23,10 +30,11 @@
},
"devDependencies": {
"@biomejs/biome": "1.4.1",
"stylelint": "^15.11.0"
"rollup": "^4.9.2",
"stylelint": "^16.1.0"
},
"peerDependencies": {
"stylelint": ">=15"
"stylelint": "^15.0.0 || ^16.0.0"
},
"dependencies": {
"stylelint-order": "^6.0.3"
Expand Down
13 changes: 13 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
input: 'index.js',
output: [
{
file: 'dist/index.mjs',
format: 'es',
},
{
file: 'dist/index.cjs',
format: 'cjs',
},
],
}

0 comments on commit 16403c0

Please sign in to comment.