diff --git a/.gitignore b/.gitignore index f5e1955..10fcc93 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .DS_Store unpackage node_modules +.vscode diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..64a0abf --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,246 @@ +{ + "extends": [ + "stylelint-config-standard", + "stylelint-config-recommended-scss", + "stylelint-config-recess-order", + "stylelint-config-html/vue" + ], + "rules": { + "no-descending-specificity": null, + "selector-class-pattern": null, + "keyframes-name-pattern": null, + "unit-no-unknown": null, + "selector-type-no-unknown": [ + true, + { + "ignoreTypes": ["page"] + } + ], + "color-hex-length": null, + "order/properties-order": [ + true, + { + "properties": [ + "position", + "top", + "right", + "bottom", + "left", + "z-index", + "display", + "float", + "width", + "height", + "max-width", + "max-height", + "min-width", + "min-height", + "padding", + "padding-top", + "padding-right", + "padding-bottom", + "padding-left", + "margin", + "margin-top", + "margin-right", + "margin-bottom", + "margin-left", + "margin-collapse", + "margin-top-collapse", + "margin-right-collapse", + "margin-bottom-collapse", + "margin-left-collapse", + "overflow", + "overflow-x", + "overflow-y", + "clip", + "clear", + "font", + "font-family", + "font-size", + "font-smoothing", + "font-style", + "font-weight", + "hyphens", + "src", + "line-height", + "letter-spacing", + "word-spacing", + "color", + "text-align", + "text-decoration", + "text-indent", + "text-overflow", + "text-rendering", + "text-size-adjust", + "text-shadow", + "text-transform", + "word-break", + "word-wrap", + "white-space", + "vertical-align", + "list-style", + "list-style-position", + "list-style-type", + "list-style-image", + "pointer-events", + "cursor", + "background", + "background-attachment", + "background-color", + "background-image", + "background-position", + "background-repeat", + "background-size", + "border", + "border-collapse", + "border-top", + "border-right", + "border-bottom", + "border-left", + "border-color", + "border-image", + "border-top-color", + "border-right-color", + "border-bottom-color", + "border-left-color", + "border-spacing", + "border-style", + "border-width", + "border-top-width", + "border-right-width", + "border-bottom-width", + "border-left-width", + "border-radius", + "border-top-right-radius", + "border-bottom-right-radius", + "border-bottom-left-radius", + "border-top-left-radius", + "border-radius-topright", + "border-radius-bottomright", + "border-radius-bottomleft", + "border-radius-topleft", + "box-shadow", + "transform", + "transform-origin", + "backface-visibility", + "backface-visibility", + "perspective", + "perspective-origin", + "visibility", + "opacity", + "filter", + "isolation", + "object-fit", + "object-position", + "mask", + "mask-image", + "mask-mode", + "mask-position", + "mask-repeat", + "mask-size", + "mask-clip", + "mask-origin", + "mask-composite", + "mask-type", + "mask-border", + "mask-border-source", + "mask-border-slice", + "mask-border-width", + "mask-border-outset", + "mask-border-repeat", + "mask-border-mode", + "mask-box-image", + "mask-box-image-source", + "mask-box-image-slice", + "mask-box-image-width", + "mask-box-image-outset", + "mask-box-image-repeat", + "mask-box-image-mode", + "box-decoration-break", + "background-clip", + "background-origin", + "background-size", + "background-position", + "background-attachment", + "background-repeat", + "background-image", + "box-sizing", + "content", + "quotes", + "counter-reset", + "counter-increment", + "resize", + "user-select", + "nav-index", + "nav-up", + "nav-right", + "nav-down", + "nav-left", + "tab-size", + "outline", + "outline-width", + "outline-style", + "outline-color", + "outline-offset", + "table-layout", + "empty-cells", + "caption-side", + "background-color", + "border-spacing", + "border-collapse", + "speak", + "volume", + "pause", + "pause-before", + "pause-after", + "page-break-before", + "page-break-after", + "page-break-inside", + "orphans", + "widows", + "display", + "flex-direction", + "flex-order", + "flex-grow", + "flex-shrink", + "flex-basis", + "flex-flow", + "flex-wrap", + "flex", + "justify-content", + "align-self", + "align-items", + "align-content" + ] + } + ], + "declaration-property-value-no-unknown": [ + true, + { + "ignoreProperties": [ + "font-size", + "width", + "height", + "margin", + "padding", + "border-radius", + "line-height", + "box-shadow" + ] + } + ], + "shorthand-property-no-redundant-values": null, + "alpha-value-notation": null, + "color-function-notation": null, + "declaration-property-value-allowed-list": { + "font-size": ["/rpx$/"], + "width": ["/rpx$/"], + "height": ["/rpx$/"], + "margin": ["/rpx$/"], + "padding": ["/rpx$/"], + "border-radius": ["/rpx$/"], + "line-height": ["/rpx$/"] + } + } +} diff --git a/package-lock.json b/package-lock.json index 5b5f008..0fbefef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,17 +5,15 @@ "packages": { "": { "dependencies": { - "crc": "^4.3.2", - "js-md5": "^0.8.3", "pinia": "^2.2.0", "pinia-plugin-unistorage": "^0.1.2", - "sm-crypto": "^0.3.13", "uview-plus": "^3.3.12" }, "devDependencies": { "@commitlint/cli": "^19.7.1", "@commitlint/config-conventional": "^19.7.1", "commitizen": "^4.3.1", + "crc": "^4.3.2", "cz-git": "^1.11.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", @@ -24,9 +22,12 @@ "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-vue": "^9.32.0", "husky": "^9.1.7", + "js-md5": "^0.8.3", "lint-staged": "^15.4.3", "prettier": "^3.4.2", + "sm-crypto": "^0.3.13", "stylelint": "^16.14.1", + "stylelint-config-html": "^1.1.0", "stylelint-config-recess-order": "^6.0.0", "stylelint-config-recommended-scss": "^14.1.0", "stylelint-config-standard": "^37.0.0", @@ -2553,7 +2554,7 @@ "version": "1.5.1", "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "devOptional": true, + "dev": true, "funding": [ { "type": "github", @@ -2655,7 +2656,7 @@ "version": "6.0.3", "resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "devOptional": true, + "dev": true, "funding": [ { "type": "github", @@ -3313,6 +3314,7 @@ "version": "4.3.2", "resolved": "https://registry.npmmirror.com/crc/-/crc-4.3.2.tgz", "integrity": "sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -3714,6 +3716,69 @@ "node": ">=6.0.0" } }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause", + "peer": true + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-5.3.0.tgz", @@ -5226,6 +5291,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, "node_modules/human-signals": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-5.0.0.tgz", @@ -5269,7 +5355,7 @@ "version": "1.2.1", "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "devOptional": true, + "dev": true, "funding": [ { "type": "github", @@ -6066,6 +6152,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.8.3.tgz", "integrity": "sha512-qR0HB5uP6wCuRMrWPTrkMaev7MJZwJuuw4fnwAzRgP4J4/F8RwtodOKpGp4XpqsLBFzzgqIO42efFAyz2Et6KQ==", + "dev": true, "license": "MIT" }, "node_modules/js-tokens": { @@ -6092,6 +6179,7 @@ "version": "1.1.0", "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz", "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, "license": "MIT" }, "node_modules/json-buffer": { @@ -7345,6 +7433,49 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-html": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-1.8.0.tgz", + "integrity": "sha512-5mMeb1TgLWoRKxZ0Xh9RZDfwUUIqRrcxO2uXO+Ezl1N5lqpCiSU5Gk6+1kZediBfBHFtPCdopr2UZ2SgUsKcgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "htmlparser2": "^8.0.0", + "js-tokens": "^9.0.0", + "postcss": "^8.5.0", + "postcss-safe-parser": "^6.0.0" + }, + "engines": { + "node": "^12 || >=14" + } + }, + "node_modules/postcss-html/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/postcss-html/node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, "node_modules/postcss-media-query-parser": { "version": "0.2.3", "resolved": "https://registry.npmmirror.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", @@ -8165,6 +8296,7 @@ "version": "0.3.13", "resolved": "https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.13.tgz", "integrity": "sha512-ztNF+pZq6viCPMA1A6KKu3bgpkmYti5avykRHbcFIdSipFdkVmfUw2CnpM2kBJyppIalqvczLNM3wR8OQ0pT5w==", + "dev": true, "license": "MIT", "dependencies": { "jsbn": "^1.1.0" @@ -8395,6 +8527,23 @@ "node": ">=18.12.0" } }, + "node_modules/stylelint-config-html": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-html/-/stylelint-config-html-1.1.0.tgz", + "integrity": "sha512-IZv4IVESjKLumUGi+HWeb7skgO6/g4VMuAYrJdlqQFndgbj6WJAXPhaysvBiXefX79upBdQVumgYcdd17gCpjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12 || >=14" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "postcss-html": "^1.0.0", + "stylelint": ">=14.0.0" + } + }, "node_modules/stylelint-config-recess-order": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/stylelint-config-recess-order/-/stylelint-config-recess-order-6.0.0.tgz", diff --git a/package.json b/package.json index 4aaa5cb..f6fb58f 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,14 @@ { "dependencies": { - "crc": "^4.3.2", - "js-md5": "^0.8.3", "pinia": "^2.2.0", "pinia-plugin-unistorage": "^0.1.2", - "sm-crypto": "^0.3.13", "uview-plus": "^3.3.12" }, "devDependencies": { "@commitlint/cli": "^19.7.1", "@commitlint/config-conventional": "^19.7.1", "commitizen": "^4.3.1", + "crc": "^4.3.2", "cz-git": "^1.11.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", @@ -19,9 +17,12 @@ "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-vue": "^9.32.0", "husky": "^9.1.7", + "js-md5": "^0.8.3", "lint-staged": "^15.4.3", "prettier": "^3.4.2", + "sm-crypto": "^0.3.13", "stylelint": "^16.14.1", + "stylelint-config-html": "^1.1.0", "stylelint-config-recess-order": "^6.0.0", "stylelint-config-recommended-scss": "^14.1.0", "stylelint-config-standard": "^37.0.0",