⬆️ upgrade stylelint to v17

This commit is contained in:
StarHeartHunt
2026-07-25 15:24:11 +08:00
parent e11f21c678
commit 5edf14b724
5 changed files with 364 additions and 434 deletions
+7
View File
@@ -0,0 +1,7 @@
# Stylelint runs on everything by default; we only lint CSS files.
*
!*/
!*.css
build
coverage
packages/nonebot-plugin-docs/
+18 -1
View File
@@ -1,10 +1,26 @@
module.exports = {
extends: ["stylelint-config-standard", "stylelint-prettier/recommended"],
extends: ["stylelint-config-standard"],
rules: {
"selector-pseudo-class-no-unknown": [
true,
{
// :global is a CSS modules feature to escape from class name hashing
ignorePseudoClasses: ["global"],
},
],
"custom-property-empty-line-before": null,
"selector-id-pattern": null,
"declaration-empty-line-before": null,
"comment-empty-line-before": null,
"value-keyword-case": ["lower", { camelCaseSvgKeywords: true }],
},
overrides: [
{
files: ["*.css"],
rules: {
"function-no-unknown": [true, { ignoreFunctions: ["theme"] }],
// Tailwind's screen() function in media queries
"media-query-no-invalid": [true, { ignoreFunctions: ["screen"] }],
"selector-class-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
@@ -15,6 +31,7 @@ module.exports = {
],
},
},
// Must come after "*.css" so the camelCase pattern wins for CSS modules
{
files: ["*.module.css"],
rules: {
+3 -4
View File
@@ -15,7 +15,7 @@
"lint:js": "eslint --cache --report-unused-disable-directives \"**/*.{js,jsx,ts,tsx,mjs}\"",
"lint:js:fix": "pnpm lint:js --fix",
"lint:style": "stylelint \"**/*.css\"",
"lint:style:fix": "stylelint --fix \"**/*.css\"",
"lint:style:fix": "pnpm lint:style --fix",
"pyright": "pyright"
},
"devDependencies": {
@@ -33,8 +33,7 @@
"jiti": "^2.7.0",
"prettier": "^3.0.3",
"pyright": "1.1.393",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2"
"stylelint": "^17.12.0",
"stylelint-config-standard": "^40.0.0"
}
}
+335 -429
View File
File diff suppressed because it is too large Load Diff
@@ -29,6 +29,7 @@
.fix-input-color {
@apply !text-base-content !bg-base-100;
input {
@apply !text-base-content !bg-base-100;
}