@dlzn-ui/stylelint-config 2.0.87 → 2.0.88

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.
@@ -0,0 +1,48 @@
1
+ declare const _default: {
2
+ cache: true;
3
+ extends: string[];
4
+ ignoreFiles: string[];
5
+ overrides: ({
6
+ customSyntax: string;
7
+ files: string[];
8
+ rules?: undefined;
9
+ } | {
10
+ files: string[];
11
+ rules: {
12
+ 'no-descending-specificity': null;
13
+ 'no-duplicate-selectors': null;
14
+ 'selector-class-pattern': null;
15
+ };
16
+ customSyntax?: undefined;
17
+ })[];
18
+ plugins: string[];
19
+ rules: {
20
+ '@stylistic/declaration-block-trailing-semicolon': null;
21
+ '@stylistic/declaration-colon-newline-after': null;
22
+ '@stylistic/declaration-colon-space-after': null;
23
+ '@stylistic/indentation': null;
24
+ '@stylistic/no-eol-whitespace': null;
25
+ '@stylistic/selector-combinator-space-before': null;
26
+ '@stylistic/string-quotes': null;
27
+ '@stylistic/value-list-comma-newline-after': null;
28
+ 'at-rule-no-unknown': (boolean | {
29
+ ignoreAtRules: string[];
30
+ })[];
31
+ 'at-rule-prelude-no-invalid': (boolean | {
32
+ ignoreAtRules: string[];
33
+ })[];
34
+ 'csstools/use-nesting': (string | {
35
+ message: string;
36
+ })[];
37
+ 'custom-property-pattern': null;
38
+ 'import-notation': string;
39
+ 'selector-class-pattern': (string | {
40
+ message: string;
41
+ })[];
42
+ 'value-keyword-case': (string | {
43
+ ignoreFunctions: string[];
44
+ })[];
45
+ };
46
+ };
47
+
48
+ export { _default as default };
@@ -0,0 +1,48 @@
1
+ declare const _default: {
2
+ cache: true;
3
+ extends: string[];
4
+ ignoreFiles: string[];
5
+ overrides: ({
6
+ customSyntax: string;
7
+ files: string[];
8
+ rules?: undefined;
9
+ } | {
10
+ files: string[];
11
+ rules: {
12
+ 'no-descending-specificity': null;
13
+ 'no-duplicate-selectors': null;
14
+ 'selector-class-pattern': null;
15
+ };
16
+ customSyntax?: undefined;
17
+ })[];
18
+ plugins: string[];
19
+ rules: {
20
+ '@stylistic/declaration-block-trailing-semicolon': null;
21
+ '@stylistic/declaration-colon-newline-after': null;
22
+ '@stylistic/declaration-colon-space-after': null;
23
+ '@stylistic/indentation': null;
24
+ '@stylistic/no-eol-whitespace': null;
25
+ '@stylistic/selector-combinator-space-before': null;
26
+ '@stylistic/string-quotes': null;
27
+ '@stylistic/value-list-comma-newline-after': null;
28
+ 'at-rule-no-unknown': (boolean | {
29
+ ignoreAtRules: string[];
30
+ })[];
31
+ 'at-rule-prelude-no-invalid': (boolean | {
32
+ ignoreAtRules: string[];
33
+ })[];
34
+ 'csstools/use-nesting': (string | {
35
+ message: string;
36
+ })[];
37
+ 'custom-property-pattern': null;
38
+ 'import-notation': string;
39
+ 'selector-class-pattern': (string | {
40
+ message: string;
41
+ })[];
42
+ 'value-keyword-case': (string | {
43
+ ignoreFunctions: string[];
44
+ })[];
45
+ };
46
+ };
47
+
48
+ export { _default as default };
package/dist/index.mjs ADDED
@@ -0,0 +1,82 @@
1
+ const index = {
2
+ cache: true,
3
+ extends: [
4
+ "@stylistic/stylelint-config",
5
+ "stylelint-config-standard",
6
+ "stylelint-config-recess-order",
7
+ "stylelint-config-recommended-vue"
8
+ // 放最后一个 依赖 postcss-html
9
+ ],
10
+ // 设置 ignoreFiles 会覆盖默认忽略 node_modules,需显式包含
11
+ // https://stylelint.io/user-guide/configure/#ignorefiles
12
+ ignoreFiles: [
13
+ "**/*.min.css",
14
+ ".vscode/**",
15
+ ".idea/**",
16
+ "node_modules/**",
17
+ "dist/**",
18
+ "public/**",
19
+ "dist-ssr/**"
20
+ ],
21
+ // 格式化 md 文件中的 css 代码
22
+ overrides: [
23
+ {
24
+ customSyntax: "postcss-markdown",
25
+ files: ["*.md", "**/*.md"]
26
+ },
27
+ {
28
+ files: ["**/element-plus/theme-chalk/**/*.css"],
29
+ rules: {
30
+ "no-descending-specificity": null,
31
+ "no-duplicate-selectors": null,
32
+ "selector-class-pattern": null
33
+ }
34
+ }
35
+ ],
36
+ plugins: ["stylelint-use-nesting"],
37
+ // null (to turn the rule off)
38
+ rules: {
39
+ "@stylistic/declaration-block-trailing-semicolon": null,
40
+ // 与 prettier 保持一致
41
+ "@stylistic/declaration-colon-newline-after": null,
42
+ // 与 prettier 保持一致
43
+ "@stylistic/declaration-colon-space-after": null,
44
+ // 与 prettier 保持一致
45
+ "@stylistic/indentation": null,
46
+ // 与 prettier 保持一致
47
+ "@stylistic/no-eol-whitespace": null,
48
+ // 与 prettier 保持一致
49
+ "@stylistic/selector-combinator-space-before": null,
50
+ // 与 prettier 保持一致
51
+ "@stylistic/string-quotes": null,
52
+ // 与 prettier 保持一致
53
+ "@stylistic/value-list-comma-newline-after": null,
54
+ // 与 prettier 保持一致
55
+ "at-rule-no-unknown": [
56
+ true,
57
+ {
58
+ ignoreAtRules: ["theme", "reference", "source"]
59
+ }
60
+ ],
61
+ "at-rule-prelude-no-invalid": [true, { ignoreAtRules: ["apply"] }],
62
+ "csstools/use-nesting": [
63
+ "always",
64
+ {
65
+ message: "\u5C3D\u91CF\u4F7F\u7528\u5D4C\u5957\u5199\u6CD5"
66
+ }
67
+ ],
68
+ "custom-property-pattern": null,
69
+ "import-notation": "string",
70
+ // TODO url 模式好像 tailwindcss 引入有问题
71
+ "selector-class-pattern": [
72
+ "^(t-|el-|([a-zA-Z][a-zA-Z0-9_]*[a-zA-Z0-9])$)",
73
+ {
74
+ // disableFix: true, // disable autofix
75
+ message: "\u81EA\u5B9A\u4E49 class \u540D\u79F0\u4F7F\u7528 snake_case"
76
+ }
77
+ ],
78
+ "value-keyword-case": ["lower", { ignoreFunctions: ["v-bind"] }]
79
+ }
80
+ };
81
+
82
+ export { index as default };
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@dlzn-ui/stylelint-config",
3
3
  "type": "module",
4
- "version": "2.0.87",
4
+ "version": "2.0.88",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "exports": {
10
10
  ".": {
11
- "import": "./index.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs"
12
13
  }
13
14
  },
15
+ "files": [
16
+ "dist"
17
+ ],
14
18
  "peerDependencies": {
15
19
  "stylelint": "^18.0.0"
16
20
  },
@@ -23,5 +27,12 @@
23
27
  "stylelint-config-standard": "^41.0.0",
24
28
  "stylelint-order": "^8.1.3",
25
29
  "stylelint-use-nesting": "^6.0.2"
30
+ },
31
+ "devDependencies": {
32
+ "unbuild": "^3.6.1"
33
+ },
34
+ "scripts": {
35
+ "build": "unbuild",
36
+ "stub": "unbuild --stub"
26
37
  }
27
38
  }
package/index.ts DELETED
@@ -1,76 +0,0 @@
1
- // [插件集合](https://stylelint.io/awesome-stylelint/)
2
- // [stylelint 内置规则集](https://stylelint.io/user-guide/rules)
3
- // 最新的版本去除了很多配置,比如缩进, 抛弃的规则 可在 @stylistic/stylelint-config(https://github.com/stylelint-stylistic/stylelint-config/blob/main/stylelint.config.js) 中找回
4
-
5
- import type { Config } from 'stylelint'
6
-
7
- export default {
8
- cache: true,
9
- extends: [
10
- '@stylistic/stylelint-config',
11
- 'stylelint-config-standard',
12
- 'stylelint-config-recess-order',
13
- 'stylelint-config-recommended-vue', // 放最后一个 依赖 postcss-html
14
- ],
15
- // 设置 ignoreFiles 会覆盖默认忽略 node_modules,需显式包含
16
- // https://stylelint.io/user-guide/configure/#ignorefiles
17
- ignoreFiles: [
18
- '**/*.min.css',
19
- '.vscode/**',
20
- '.idea/**',
21
- 'node_modules/**',
22
- 'dist/**',
23
- 'public/**',
24
- 'dist-ssr/**',
25
- ],
26
- // 格式化 md 文件中的 css 代码
27
- overrides: [
28
- {
29
- customSyntax: 'postcss-markdown',
30
- files: ['*.md', '**/*.md'],
31
- },
32
- {
33
- files: ['**/element-plus/theme-chalk/**/*.css'],
34
- rules: {
35
- 'no-descending-specificity': null,
36
- 'no-duplicate-selectors': null,
37
- 'selector-class-pattern': null,
38
- },
39
- },
40
- ],
41
- plugins: ['stylelint-use-nesting'],
42
- // null (to turn the rule off)
43
- rules: {
44
- '@stylistic/declaration-block-trailing-semicolon': null, // 与 prettier 保持一致
45
- '@stylistic/declaration-colon-newline-after': null, // 与 prettier 保持一致
46
- '@stylistic/declaration-colon-space-after': null, // 与 prettier 保持一致
47
- '@stylistic/indentation': null, // 与 prettier 保持一致
48
- '@stylistic/no-eol-whitespace': null, // 与 prettier 保持一致
49
- '@stylistic/selector-combinator-space-before': null, // 与 prettier 保持一致
50
- '@stylistic/string-quotes': null, // 与 prettier 保持一致
51
- '@stylistic/value-list-comma-newline-after': null, // 与 prettier 保持一致
52
- 'at-rule-no-unknown': [
53
- true,
54
- {
55
- ignoreAtRules: ['theme', 'reference', 'source'],
56
- },
57
- ],
58
- 'at-rule-prelude-no-invalid': [true, { ignoreAtRules: ['apply'] }],
59
- 'csstools/use-nesting': [
60
- 'always',
61
- {
62
- message: '尽量使用嵌套写法',
63
- },
64
- ],
65
- 'custom-property-pattern': null,
66
- 'import-notation': 'string', // TODO url 模式好像 tailwindcss 引入有问题
67
- 'selector-class-pattern': [
68
- '^(t-|el-|([a-zA-Z][a-zA-Z0-9_]*[a-zA-Z0-9])$)',
69
- {
70
- // disableFix: true, // disable autofix
71
- message: '自定义 class 名称使用 snake_case',
72
- },
73
- ],
74
- 'value-keyword-case': ['lower', { ignoreFunctions: ['v-bind'] }],
75
- },
76
- } satisfies Config