@stackou/stylelint-config 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -0
- package/package.json +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @stackou/stylelint-config
|
|
2
|
+
|
|
3
|
+
这是我个人的 Stylelint 配置预设。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
在你的项目中安装 `@stackou/stylelint-config` 包:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add -D eslint @stackou/stylelint-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
在你的项目根目录下创建 stylelint.config.js:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
// stylelint.config.js
|
|
17
|
+
import stackou from '@stackou/stylelint-config'
|
|
18
|
+
|
|
19
|
+
export default stackou
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## NPM Scripts 脚本
|
|
23
|
+
|
|
24
|
+
将以下 lint 命令添加到你的脚本 package.json 部分:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"scripts": {
|
|
29
|
+
"lint:stylelint": "stylelint \"**/*.{css,scss,vue}\" --fix"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## VS Code Support VS Code 支持
|
|
35
|
+
|
|
36
|
+
在 VS Code 中,为了启用对 Stylelint 平面配置的支持,请编辑您的 .vscode/settings.json 文件并添加以下内容
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
// .vscode/settings.json
|
|
40
|
+
{
|
|
41
|
+
|
|
42
|
+
// 自动修复
|
|
43
|
+
"editor.codeActionsOnSave": {
|
|
44
|
+
"source.fixAll.stylelint": "explicit",
|
|
45
|
+
"source.organizeImports": "never"
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
// 为所有支持的语言启用stylelint
|
|
49
|
+
"stylelint.validate": ["css", "postcss", "scss", "vue", "sass"]
|
|
50
|
+
}
|
|
51
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={extends:["stylelint-config-standard","stylelint-config-recess-order"],ignoreFiles:["**/*.js","**/*.jsx","**/*.tsx","**/*.ts","**/*.json","**/*.md","**/node_modules/**","**/dist/**"],overrides:[{customSyntax:"postcss-html",files:["*.(html|vue)","**/*.(html|vue)"],rules:{"selector-pseudo-class-no-unknown":[!0,{ignorePseudoClasses:["global","deep","export"]}],"selector-pseudo-element-no-unknown":[!0,{ignorePseudoElements:["v-deep","v-global","v-slotted"]}]}},{customSyntax:"postcss-scss",extends:["stylelint-config-recommended-scss","stylelint-config-recommended-vue/scss"],files:["*.scss","**/*.scss"]}],plugins:["stylelint-order","@stylistic/stylelint-plugin","stylelint-scss"],rules:{"at-rule-no-unknown":[!0,{ignoreAtRules:["extend","extends","ignores","include","mixin","if","else","media","warn","for","at-root","tailwind","apply","variants","responsive","screen","function","each","use","forward","return"]}],"font-family-no-missing-generic-family-keyword":null,"function-no-unknown":null,"import-notation":null,"media-feature-range-notation":null,"named-grid-areas-no-invalid":null,"no-descending-specificity":null,"no-empty-source":null,"order/order":[["dollar-variables","custom-properties","at-rules","declarations",{name:"supports",type:"at-rule"},{name:"media",type:"at-rule"},{name:"include",type:"at-rule"},"rules"],{severity:"error"}],"rule-empty-line-before":"never","scss/at-rule-no-unknown":[!0,{ignoreAtRules:["extend","extends","ignores","include","mixin","if","else","media","warn","for","at-root","tailwind","apply","variants","responsive","screen","function","each","use","forward","return"]}],"unit-no-unknown":[!0,{ignoreUnits:["rpx"]}],"selector-type-no-unknown":[!0,{ignoreTypes:["page"]}],"declaration-property-value-no-unknown":null,"scss/operator-no-newline-after":null,"selector-class-pattern":"^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:[.+])?$","selector-not-notation":null,"function-url-quotes":"always","color-hex-length":"long","scss/at-import-partial-extension":null,"property-no-unknown":null,"value-no-vendor-prefix":null,"value-keyword-case":null,"at-rule-empty-line-before":null,"@stylistic/max-line-length":null}};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={extends:["stylelint-config-standard","stylelint-config-recess-order"],ignoreFiles:["**/*.js","**/*.jsx","**/*.tsx","**/*.ts","**/*.json","**/*.md","**/node_modules/**","**/dist/**"],overrides:[{customSyntax:"postcss-html",files:["*.(html|vue)","**/*.(html|vue)"],rules:{"selector-pseudo-class-no-unknown":[!0,{ignorePseudoClasses:["global","deep","export"]}],"selector-pseudo-element-no-unknown":[!0,{ignorePseudoElements:["v-deep","v-global","v-slotted"]}]}},{customSyntax:"postcss-scss",extends:["stylelint-config-recommended-scss","stylelint-config-recommended-vue/scss"],files:["*.scss","**/*.scss"]}],plugins:["stylelint-order","@stylistic/stylelint-plugin","stylelint-scss"],rules:{"at-rule-no-unknown":[!0,{ignoreAtRules:["extend","extends","ignores","include","mixin","if","else","media","warn","for","at-root","tailwind","apply","variants","responsive","screen","function","each","use","forward","return"]}],"font-family-no-missing-generic-family-keyword":null,"function-no-unknown":null,"import-notation":null,"media-feature-range-notation":null,"named-grid-areas-no-invalid":null,"no-descending-specificity":null,"no-empty-source":null,"order/order":[["dollar-variables","custom-properties","at-rules","declarations",{name:"supports",type:"at-rule"},{name:"media",type:"at-rule"},{name:"include",type:"at-rule"},"rules"],{severity:"error"}],"rule-empty-line-before":"never","scss/at-rule-no-unknown":[!0,{ignoreAtRules:["extend","extends","ignores","include","mixin","if","else","media","warn","for","at-root","tailwind","apply","variants","responsive","screen","function","each","use","forward","return"]}],"unit-no-unknown":[!0,{ignoreUnits:["rpx"]}],"selector-type-no-unknown":[!0,{ignoreTypes:["page"]}],"declaration-property-value-no-unknown":null,"scss/operator-no-newline-after":null,"selector-class-pattern":"^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:[.+])?$","selector-not-notation":null,"function-url-quotes":"always","color-hex-length":"long","scss/at-import-partial-extension":null,"property-no-unknown":null,"value-no-vendor-prefix":null,"value-keyword-case":null,"at-rule-empty-line-before":null,"@stylistic/max-line-length":null}};export{e as default};
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stackou/stylelint-config",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"packageManager": "pnpm@10.15.0",
|
|
6
|
+
"description": "Hanworks Stylelint config",
|
|
7
|
+
"author": "Hanworks <khan97z.miao@gmail.com> (https://github.com/hanworks97/)",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"homepage": "https://github.com/hanworks97/stylelint-config",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/hanworks97/stylelint-config.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/hanworks97/stylelint-config/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"stylelint-config"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "dist/index.cjs",
|
|
30
|
+
"module": "dist/index.js",
|
|
31
|
+
"types": "dist/index.d.ts",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "rollup -c",
|
|
37
|
+
"postinstall": "npm run build",
|
|
38
|
+
"lint": "eslint .",
|
|
39
|
+
"lint:fix": "eslint . --fix",
|
|
40
|
+
"commit": "czg"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"autoprefixer": ">=10.4.20",
|
|
44
|
+
"postcss": ">=8.5.3",
|
|
45
|
+
"stylelint": ">=16.14.1"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@stylistic/stylelint-plugin": "^3.1.2",
|
|
49
|
+
"postcss-html": "^1.8.0",
|
|
50
|
+
"postcss-scss": "^4.0.9",
|
|
51
|
+
"stylelint-config-recess-order": "^6.0.0",
|
|
52
|
+
"stylelint-config-recommended": "^15.0.0",
|
|
53
|
+
"stylelint-config-recommended-scss": "^14.1.0",
|
|
54
|
+
"stylelint-config-recommended-vue": "^1.6.0",
|
|
55
|
+
"stylelint-config-standard": "^37.0.0",
|
|
56
|
+
"stylelint-order": "^6.0.4",
|
|
57
|
+
"stylelint-scss": "^6.11.1"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@antfu/eslint-config": "^4.15.0",
|
|
61
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
62
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
63
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
64
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
+
"@stackou/commitlint-config": "^1.0.0",
|
|
66
|
+
"@stackou/eslint-config": "^1.0.0",
|
|
67
|
+
"czg": "^1.12.0",
|
|
68
|
+
"eslint": "^9.29.0",
|
|
69
|
+
"eslint-plugin-format": "^1.0.2",
|
|
70
|
+
"lefthook": "^2.0.13",
|
|
71
|
+
"rollup": "^4.34.1",
|
|
72
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
73
|
+
"rollup-plugin-delete": "^3.0.1",
|
|
74
|
+
"rollup-plugin-typescript2": "^0.36.0"
|
|
75
|
+
}
|
|
76
|
+
}
|