@taiga-ui/stylelint-config 0.439.0 → 0.441.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/stylelint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.441.0",
|
|
4
4
|
"description": "Taiga UI stylelint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stylelint",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@stylistic/stylelint-config": "^4.0.0",
|
|
35
35
|
"@stylistic/stylelint-plugin": "^5.0.1",
|
|
36
|
-
"@taiga-ui/browserslist-config": "0.
|
|
36
|
+
"@taiga-ui/browserslist-config": "0.441.0",
|
|
37
37
|
"postcss": "^8.5.8",
|
|
38
38
|
"postcss-less": "^6.0.0",
|
|
39
39
|
"stylelint": "^17.5.0",
|
|
@@ -72,58 +72,56 @@ function splitQueryAndHash(value) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/** @type {import('stylelint').Rule} */
|
|
75
|
-
const ruleFunction = (primary) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const expectedExtension = getExpectedExtension(root);
|
|
75
|
+
const ruleFunction = (primary) => (root, result) => {
|
|
76
|
+
const validOptions = validateOptions(result, ruleName, {
|
|
77
|
+
actual: primary,
|
|
78
|
+
possible: [true],
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
if (!validOptions) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
const params = atRule.params.trim();
|
|
85
|
+
const expectedExtension = getExpectedExtension(root);
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
87
|
+
root.walkAtRules('import', (atRule) => {
|
|
88
|
+
const params = atRule.params.trim();
|
|
94
89
|
|
|
95
|
-
|
|
90
|
+
if (isUrlImport(params)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
96
93
|
|
|
97
|
-
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
94
|
+
const match = params.match(/^(['"])([^'"]+)\1(.*)$/);
|
|
100
95
|
|
|
101
|
-
|
|
96
|
+
if (!match) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
100
|
+
const [, quote, rawImportPath, tail] = match;
|
|
106
101
|
|
|
107
|
-
|
|
102
|
+
if (!isLocalImportPath(rawImportPath)) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
106
|
+
const {pathname, suffix} = splitQueryAndHash(rawImportPath);
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
if (hasKnownStyleExtension(pathname)) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
115
111
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
112
|
+
const fixedPath = `${pathname}${expectedExtension}${suffix}`;
|
|
113
|
+
const fixedParams = `${quote}${fixedPath}${quote}${tail}`;
|
|
114
|
+
|
|
115
|
+
report({
|
|
116
|
+
fix: () => {
|
|
117
|
+
atRule.params = fixedParams;
|
|
118
|
+
},
|
|
119
|
+
message: messages.expected(rawImportPath, fixedPath),
|
|
120
|
+
node: atRule,
|
|
121
|
+
result,
|
|
122
|
+
ruleName,
|
|
125
123
|
});
|
|
126
|
-
};
|
|
124
|
+
});
|
|
127
125
|
};
|
|
128
126
|
|
|
129
127
|
ruleFunction.ruleName = ruleName;
|