diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000000000..dcf00bc14 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,20 @@ +{ + "plugins": [ + "stylelint-stylus" + ], + "extends": [ + "stylelint-stylus/standard" + ], + "rules": { + "stylus/semicolon": "always", + "stylus/pythonic": "never", + "stylus/declaration-colon": "always", + "stylus/number-leading-zero": "never", + "stylus/selector-list-comma": "always", + "stylus/selector-list-comma-newline-after": "never-multi-line", + "stylus/media-feature-colon": "always", + "stylus/single-line-comment": false, + "stylus/single-line-comment-no-empty": false, + "stylus/block-closing-brace-newline-after": "never-single-line" + } +} diff --git a/.stylintrc b/.stylintrc deleted file mode 100644 index 724a26c60..000000000 --- a/.stylintrc +++ /dev/null @@ -1,45 +0,0 @@ -{ - "blocks": false, - "brackets": "always", - "colons": "always", - "colors": "always", - "commaSpace": "always", - "commentSpace": "always", - "cssLiteral": "never", - "customProperties": [], - "depthLimit": false, - "duplicates": true, - "efficient": "always", - "exclude": [], - "extendPref": false, - "globalDupe": false, - "groupOutputByFile": true, - "indentPref": false, - "leadingZero": "never", - "maxErrors": false, - "maxWarnings": false, - "mixed": false, - "mixins": [], - "namingConvention": "lowercase-dash", - "namingConventionStrict": false, - "none": "never", - "noImportant": true, - "parenSpace": false, - "placeholders": "always", - "prefixVarsWithDollar": "always", - "quotePref": false, - "reporterOptions": { - "columns": ["lineData", "severity", "description", "rule"], - "columnSplitter": " ", - "showHeaders": false, - "truncate": true - }, - "semicolons": "always", - "sortOrder": "alphabetical", - "stackedProperties": false, - "trailingWhitespace": "never", - "universal": false, - "valid": true, - "zeroUnits": "never", - "zIndexNormalize": false -} diff --git a/package.json b/package.json index c8f829553..b321f7068 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "scripts": { "eslint": "eslint scripts/ source/js test/", "prepare": "node .githooks/install.js", - "stylint": "stylint source/css/", + "stylint": "stylelint source/css/ --ip source/css/_common/scaffolding/highlight/index.styl", "test": "mocha test/index.js", "test-cov": "c8 npm test" }, @@ -40,6 +40,7 @@ "hexo-renderer-marked": "6.0.0", "js-yaml": "4.1.0", "mocha": "10.1.0", - "stylint": "2.0.0" + "stylelint": "14.15.0", + "stylelint-stylus": "0.17.0" } } diff --git a/source/css/_common/components/third-party/disqusjs.styl b/source/css/_common/components/third-party/disqusjs.styl index 1662456aa..aad736fbe 100644 --- a/source/css/_common/components/third-party/disqusjs.styl +++ b/source/css/_common/components/third-party/disqusjs.styl @@ -1,39 +1,39 @@ if (hexo-config('disqusjs.enable') and hexo-config('darkmode')) { @media (prefers-color-scheme:dark) { html #dsqjs a { - color: var(--link-color) + color: var(--link-color); } html #dsqjs a:focus,html #dsqjs a:hover { - color: var(--link-hover-color) + color: var(--link-hover-color); } html #dsqjs .dsqjs-nav,html #dsqjs footer { - border-color: var(--card-bg-color) + border-color: var(--card-bg-color); } html #dsqjs .dsqjs-load-more,html #dsqjs .dsqjs-load-more:hover,html #dsqjs .dsqjs-nav-tab,html #dsqjs .dsqjs-no-comment,html #dsqjs .dsqjs-post-content { - color: var(--text-color) + color: var(--text-color); } html #dsqjs .dsqjs-order-label { - background-color: #3e4b5e + background-color: #3e4b5e; } html #dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label { - background-color: var(--content-bg-color) + background-color: var(--content-bg-color); } html #dsqjs .dsqjs-tab-active>span:after { - background-color: #2e9fff!important + background-color: #2e9fff!important; } html #dsqjs .dsqjs-footer,html #dsqjs .dsqjs-meta { - color: var(--text-color) + color: var(--text-color); } html #dsqjs .dsqjs-post-body blockquote { - border-color: var(--content-bg-color) + border-color: var(--content-bg-color); } } }