@taiga-ui/stylelint-config 0.512.0 → 0.514.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/index.js
CHANGED
|
@@ -5,7 +5,8 @@ module.exports = {
|
|
|
5
5
|
$schema:
|
|
6
6
|
'https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json',
|
|
7
7
|
plugins: [
|
|
8
|
-
'./
|
|
8
|
+
'./rules/no-webkit-box-orient-block-axis.js',
|
|
9
|
+
'./rules/relative-less-import-extension.js',
|
|
9
10
|
'stylelint-order',
|
|
10
11
|
'stylelint-rem-over-px',
|
|
11
12
|
'stylelint-use-logical',
|
|
@@ -42,6 +43,7 @@ module.exports = {
|
|
|
42
43
|
'@stylistic/selector-pseudo-class-parentheses-space-inside': null,
|
|
43
44
|
'@stylistic/string-quotes': 'single',
|
|
44
45
|
'@stylistic/value-list-comma-newline-after': null,
|
|
46
|
+
'@taiga-ui/no-webkit-box-orient-block-axis': true,
|
|
45
47
|
'@taiga-ui/relative-less-import-extension': true,
|
|
46
48
|
'alpha-value-notation': 'number',
|
|
47
49
|
'annotation-no-unknown': true,
|
|
@@ -163,7 +165,13 @@ module.exports = {
|
|
|
163
165
|
'logical-css/require-logical-keywords': [
|
|
164
166
|
true,
|
|
165
167
|
{
|
|
166
|
-
ignore: [
|
|
168
|
+
ignore: [
|
|
169
|
+
'clear',
|
|
170
|
+
'float',
|
|
171
|
+
'resize',
|
|
172
|
+
'caption-side',
|
|
173
|
+
'box-orient', // Legacy line clamping depends on vertical orientation, issue: https://github.com/taiga-family/toolkit/issues/1651
|
|
174
|
+
],
|
|
167
175
|
},
|
|
168
176
|
],
|
|
169
177
|
'logical-css/require-logical-properties': [
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/stylelint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.514.0",
|
|
4
4
|
"description": "Taiga UI stylelint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stylelint",
|
|
7
7
|
"prettier"
|
|
8
8
|
],
|
|
9
|
+
"homepage": "https://github.com/taiga-family/toolkit#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/taiga-family/toolkit/issues"
|
|
12
|
+
},
|
|
9
13
|
"repository": {
|
|
10
14
|
"type": "git",
|
|
11
15
|
"url": "https://github.com/taiga-family/toolkit.git"
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
"peerDependencies": {
|
|
34
38
|
"@stylistic/stylelint-config": "^5.0.0",
|
|
35
39
|
"@stylistic/stylelint-plugin": "^5.1.0",
|
|
36
|
-
"@taiga-ui/browserslist-config": "0.
|
|
40
|
+
"@taiga-ui/browserslist-config": "^0.514.0",
|
|
37
41
|
"postcss": "^8.5.10",
|
|
38
42
|
"postcss-less": "^6.0.0",
|
|
39
43
|
"stylelint": "^17.9.0",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const stylelint = require('stylelint');
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
createPlugin,
|
|
5
|
+
utils: {report, ruleMessages, validateOptions},
|
|
6
|
+
} = stylelint;
|
|
7
|
+
|
|
8
|
+
const ruleName = '@taiga-ui/no-webkit-box-orient-block-axis';
|
|
9
|
+
const messages = ruleMessages(ruleName, {
|
|
10
|
+
expected:
|
|
11
|
+
'Expected "-webkit-box-orient: block-axis" to be "-webkit-box-orient: vertical"',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
fixable: true,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @type {import('stylelint').Rule} */
|
|
19
|
+
const ruleFunction = (primary) => (root, result) => {
|
|
20
|
+
const validOptions = validateOptions(result, ruleName, {
|
|
21
|
+
actual: primary,
|
|
22
|
+
possible: [true],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (!validOptions) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
root.walkDecls('-webkit-box-orient', (decl) => {
|
|
30
|
+
if (decl.value.trim().toLowerCase() !== 'block-axis') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
report({
|
|
35
|
+
fix: () => {
|
|
36
|
+
decl.value = 'vertical';
|
|
37
|
+
},
|
|
38
|
+
message: messages.expected,
|
|
39
|
+
node: decl,
|
|
40
|
+
result,
|
|
41
|
+
ruleName,
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
ruleFunction.ruleName = ruleName;
|
|
47
|
+
ruleFunction.messages = messages;
|
|
48
|
+
ruleFunction.meta = meta;
|
|
49
|
+
|
|
50
|
+
module.exports = createPlugin(ruleName, ruleFunction);
|
|
51
|
+
module.exports.ruleName = ruleName;
|
|
52
|
+
module.exports.messages = messages;
|
|
53
|
+
module.exports.meta = meta;
|
|
File without changes
|