@pengzhanbo/stylelint-config 0.3.9 → 0.3.10
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/dist/index.cjs +51 -18
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +51 -18
- package/package.json +6 -3
package/dist/index.cjs
CHANGED
|
@@ -1,24 +1,50 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const localPkg = require('local-pkg');
|
|
4
|
+
|
|
5
|
+
const cssInJs = localPkg.isPackageExists("styled-components") || localPkg.isPackageExists("@emotion/css") || localPkg.isPackageExists("@emotion/react") || localPkg.isPackageExists("@emotion/styled");
|
|
6
|
+
const jsExtension = [
|
|
7
|
+
"*.js",
|
|
8
|
+
"*.ts",
|
|
9
|
+
"*.jsx",
|
|
10
|
+
"*.tsx",
|
|
11
|
+
"*.mjs",
|
|
12
|
+
"*.cjs",
|
|
13
|
+
"*.mts",
|
|
14
|
+
"*.cts"
|
|
15
|
+
];
|
|
16
|
+
const ignoreJs = !cssInJs ? jsExtension : [];
|
|
17
|
+
const jsOverrides = cssInJs ? [
|
|
18
|
+
{
|
|
19
|
+
files: jsExtension.map((extension) => [extension, `**/${extension}`]).flat(),
|
|
20
|
+
customSyntax: "postcss-styled-syntax"
|
|
21
|
+
}
|
|
22
|
+
] : [];
|
|
3
23
|
const index = {
|
|
4
|
-
extends: [
|
|
5
|
-
"stylelint-config-standard",
|
|
6
|
-
"stylelint-config-recess-order",
|
|
7
|
-
"stylelint-config-prettier"
|
|
8
|
-
],
|
|
24
|
+
extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
|
|
9
25
|
ignoreFiles: [
|
|
10
26
|
"dist",
|
|
11
27
|
"*.d.ts",
|
|
12
|
-
"*.js",
|
|
13
|
-
"*.ts",
|
|
14
28
|
"*.min.*",
|
|
15
29
|
"LICENSE*",
|
|
16
30
|
"public",
|
|
31
|
+
"output",
|
|
32
|
+
"out",
|
|
17
33
|
"temp",
|
|
18
34
|
"package-lock.json",
|
|
19
35
|
"pnpm-lock.yaml",
|
|
20
36
|
"yarn.lock",
|
|
21
|
-
"__snapshots__"
|
|
37
|
+
"__snapshots__",
|
|
38
|
+
"*.png",
|
|
39
|
+
"*.ico",
|
|
40
|
+
"*.toml",
|
|
41
|
+
"*.patch",
|
|
42
|
+
"*.txt",
|
|
43
|
+
"*.crt",
|
|
44
|
+
"*.key",
|
|
45
|
+
"*Dockerfile",
|
|
46
|
+
".vitepress/cache",
|
|
47
|
+
...ignoreJs
|
|
22
48
|
],
|
|
23
49
|
overrides: [
|
|
24
50
|
{
|
|
@@ -29,12 +55,23 @@ const index = {
|
|
|
29
55
|
{
|
|
30
56
|
files: ["*.vue", "**/*.vue"],
|
|
31
57
|
customSyntax: "postcss-html",
|
|
32
|
-
extends: ["stylelint-config-
|
|
58
|
+
extends: ["stylelint-config-html/vue"]
|
|
33
59
|
},
|
|
34
60
|
{
|
|
35
61
|
files: ["*.html", "**/*.html", "*.htm", "**/*.htm"],
|
|
36
|
-
customSyntax: "postcss-html"
|
|
37
|
-
|
|
62
|
+
customSyntax: "postcss-html",
|
|
63
|
+
extends: ["stylelint-config-html/html"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
files: ["*.svelte", "**/*.svelte"],
|
|
67
|
+
customSyntax: "postcss-html",
|
|
68
|
+
extends: ["stylelint-config-html/svelte"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
files: ["*.md", "**/*.md"],
|
|
72
|
+
customSyntax: "postcss-markdown"
|
|
73
|
+
},
|
|
74
|
+
...jsOverrides
|
|
38
75
|
],
|
|
39
76
|
rules: {
|
|
40
77
|
"at-rule-no-unknown": [
|
|
@@ -42,15 +79,11 @@ const index = {
|
|
|
42
79
|
{
|
|
43
80
|
ignoreAtRules: [
|
|
44
81
|
"tailwind",
|
|
82
|
+
"layer",
|
|
45
83
|
"apply",
|
|
84
|
+
"config",
|
|
46
85
|
"variants",
|
|
47
|
-
"
|
|
48
|
-
"screen",
|
|
49
|
-
"function",
|
|
50
|
-
"if",
|
|
51
|
-
"each",
|
|
52
|
-
"include",
|
|
53
|
-
"mixin"
|
|
86
|
+
"screen"
|
|
54
87
|
]
|
|
55
88
|
}
|
|
56
89
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,10 @@ declare const _default: {
|
|
|
4
4
|
overrides: ({
|
|
5
5
|
files: string[];
|
|
6
6
|
customSyntax: string;
|
|
7
|
-
extends: string[];
|
|
8
7
|
} | {
|
|
9
8
|
files: string[];
|
|
10
9
|
customSyntax: string;
|
|
11
|
-
extends
|
|
10
|
+
extends: string[];
|
|
12
11
|
})[];
|
|
13
12
|
rules: {
|
|
14
13
|
'at-rule-no-unknown': (boolean | {
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,48 @@
|
|
|
1
|
+
import { isPackageExists } from 'local-pkg';
|
|
2
|
+
|
|
3
|
+
const cssInJs = isPackageExists("styled-components") || isPackageExists("@emotion/css") || isPackageExists("@emotion/react") || isPackageExists("@emotion/styled");
|
|
4
|
+
const jsExtension = [
|
|
5
|
+
"*.js",
|
|
6
|
+
"*.ts",
|
|
7
|
+
"*.jsx",
|
|
8
|
+
"*.tsx",
|
|
9
|
+
"*.mjs",
|
|
10
|
+
"*.cjs",
|
|
11
|
+
"*.mts",
|
|
12
|
+
"*.cts"
|
|
13
|
+
];
|
|
14
|
+
const ignoreJs = !cssInJs ? jsExtension : [];
|
|
15
|
+
const jsOverrides = cssInJs ? [
|
|
16
|
+
{
|
|
17
|
+
files: jsExtension.map((extension) => [extension, `**/${extension}`]).flat(),
|
|
18
|
+
customSyntax: "postcss-styled-syntax"
|
|
19
|
+
}
|
|
20
|
+
] : [];
|
|
1
21
|
const index = {
|
|
2
|
-
extends: [
|
|
3
|
-
"stylelint-config-standard",
|
|
4
|
-
"stylelint-config-recess-order",
|
|
5
|
-
"stylelint-config-prettier"
|
|
6
|
-
],
|
|
22
|
+
extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
|
|
7
23
|
ignoreFiles: [
|
|
8
24
|
"dist",
|
|
9
25
|
"*.d.ts",
|
|
10
|
-
"*.js",
|
|
11
|
-
"*.ts",
|
|
12
26
|
"*.min.*",
|
|
13
27
|
"LICENSE*",
|
|
14
28
|
"public",
|
|
29
|
+
"output",
|
|
30
|
+
"out",
|
|
15
31
|
"temp",
|
|
16
32
|
"package-lock.json",
|
|
17
33
|
"pnpm-lock.yaml",
|
|
18
34
|
"yarn.lock",
|
|
19
|
-
"__snapshots__"
|
|
35
|
+
"__snapshots__",
|
|
36
|
+
"*.png",
|
|
37
|
+
"*.ico",
|
|
38
|
+
"*.toml",
|
|
39
|
+
"*.patch",
|
|
40
|
+
"*.txt",
|
|
41
|
+
"*.crt",
|
|
42
|
+
"*.key",
|
|
43
|
+
"*Dockerfile",
|
|
44
|
+
".vitepress/cache",
|
|
45
|
+
...ignoreJs
|
|
20
46
|
],
|
|
21
47
|
overrides: [
|
|
22
48
|
{
|
|
@@ -27,12 +53,23 @@ const index = {
|
|
|
27
53
|
{
|
|
28
54
|
files: ["*.vue", "**/*.vue"],
|
|
29
55
|
customSyntax: "postcss-html",
|
|
30
|
-
extends: ["stylelint-config-
|
|
56
|
+
extends: ["stylelint-config-html/vue"]
|
|
31
57
|
},
|
|
32
58
|
{
|
|
33
59
|
files: ["*.html", "**/*.html", "*.htm", "**/*.htm"],
|
|
34
|
-
customSyntax: "postcss-html"
|
|
35
|
-
|
|
60
|
+
customSyntax: "postcss-html",
|
|
61
|
+
extends: ["stylelint-config-html/html"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
files: ["*.svelte", "**/*.svelte"],
|
|
65
|
+
customSyntax: "postcss-html",
|
|
66
|
+
extends: ["stylelint-config-html/svelte"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
files: ["*.md", "**/*.md"],
|
|
70
|
+
customSyntax: "postcss-markdown"
|
|
71
|
+
},
|
|
72
|
+
...jsOverrides
|
|
36
73
|
],
|
|
37
74
|
rules: {
|
|
38
75
|
"at-rule-no-unknown": [
|
|
@@ -40,15 +77,11 @@ const index = {
|
|
|
40
77
|
{
|
|
41
78
|
ignoreAtRules: [
|
|
42
79
|
"tailwind",
|
|
80
|
+
"layer",
|
|
43
81
|
"apply",
|
|
82
|
+
"config",
|
|
44
83
|
"variants",
|
|
45
|
-
"
|
|
46
|
-
"screen",
|
|
47
|
-
"function",
|
|
48
|
-
"if",
|
|
49
|
-
"each",
|
|
50
|
-
"include",
|
|
51
|
-
"mixin"
|
|
84
|
+
"screen"
|
|
52
85
|
]
|
|
53
86
|
}
|
|
54
87
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pengzhanbo/stylelint-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"stylelint-config"
|
|
6
6
|
],
|
|
@@ -37,17 +37,20 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"local-pkg": "^0.4.3",
|
|
40
41
|
"postcss": "^8.4.23",
|
|
41
42
|
"postcss-html": "^1.5.0",
|
|
43
|
+
"postcss-markdown": "^1.2.0",
|
|
42
44
|
"postcss-scss": "^4.0.6",
|
|
43
|
-
"
|
|
45
|
+
"postcss-styled-syntax": "^0.4.0",
|
|
46
|
+
"stylelint-config-html": "^1.1.0",
|
|
44
47
|
"stylelint-config-recess-order": "^4.0.0",
|
|
45
48
|
"stylelint-config-recommended-scss": "^11.0.0",
|
|
46
|
-
"stylelint-config-recommended-vue": "^1.4.0",
|
|
47
49
|
"stylelint-config-standard": "^33.0.0",
|
|
48
50
|
"stylelint-config-standard-scss": "^9.0.0"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
53
|
+
"stylelint": "^15.6.1",
|
|
51
54
|
"unbuild": "^1.2.1"
|
|
52
55
|
},
|
|
53
56
|
"peerDependencies": {
|