@servicetitan/stylelint-config 22.2.1 → 22.4.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/dist/function-url-no-absolute.d.ts +10 -1
- package/dist/function-url-no-absolute.d.ts.map +1 -1
- package/dist/function-url-no-absolute.js +2 -0
- package/dist/function-url-no-absolute.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +112 -0
- package/dist/index.js.map +1 -1
- package/dist/use-tokens/index.d.ts +10 -1
- package/dist/use-tokens/index.d.ts.map +1 -1
- package/dist/use-tokens/index.js +2 -0
- package/dist/use-tokens/index.js.map +1 -1
- package/package.json +10 -7
- package/src/function-url-no-absolute.ts +5 -2
- package/src/index.ts +114 -2
- package/src/use-tokens/index.ts +6 -7
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Rule } from 'stylelint';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
ruleName: string;
|
|
4
|
+
rule: Rule<any, any>;
|
|
5
|
+
} & {
|
|
6
|
+
ruleName: string;
|
|
7
|
+
messages: {
|
|
8
|
+
rejected: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
2
11
|
export = _default;
|
|
3
12
|
//# sourceMappingURL=function-url-no-absolute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-url-no-absolute.d.ts","sourceRoot":"","sources":["../src/function-url-no-absolute.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"function-url-no-absolute.d.ts","sourceRoot":"","sources":["../src/function-url-no-absolute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,WAAW,CAAC;;;;;;;;;;AAgDtD,kBAA+E"}
|
|
@@ -33,5 +33,7 @@ const plugin = actual => {
|
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
+
plugin.ruleName = ruleName;
|
|
37
|
+
plugin.messages = messages;
|
|
36
38
|
module.exports = Object.assign((0, stylelint_1.createPlugin)(ruleName, plugin), { ruleName, messages });
|
|
37
39
|
//# sourceMappingURL=function-url-no-absolute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-url-no-absolute.js","sourceRoot":"","sources":["../src/function-url-no-absolute.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"function-url-no-absolute.js","sourceRoot":"","sources":["../src/function-url-no-absolute.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,uDAA+B;AAE/B,MAAM,uBAAuB,GAAG,OAAO,CAAC,6CAA6C,CAI5E,CAAC;AAEV,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE7E,MAAM,QAAQ,GAAG,wCAAwC,CAAC;AAC1D,MAAM,QAAQ,GAAG,iBAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,yBAAyB;CACtC,CAAC,CAAC;AAEH,MAAM,MAAM,GAAS,MAAM,CAAC,EAAE;IAC1B,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QACpB,MAAM,YAAY,GAAG,iBAAK,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAEzE,IAAI,CAAC,YAAY,EAAE;YACf,OAAO;SACV;QAED,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YAClB,uBAAuB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAC1E,MAAM,GAAG,GAAG,IAAA,cAAI,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBAE/B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;oBACrB,OAAO;iBACV;gBAED,iBAAK,CAAC,MAAM,CAAC;oBACT,OAAO,EAAE,QAAQ,CAAC,QAAQ;oBAC1B,IAAI,EAAE,IAAI;oBACV,KAAK;oBACL,MAAM;oBACN,QAAQ;iBACX,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC3B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAE3B,iBAAS,MAAM,CAAC,MAAM,CAAC,IAAA,wBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;;AAEnC,kBA8HqB"}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,119 @@
|
|
|
2
2
|
module.exports = {
|
|
3
3
|
extends: ['stylelint-config-recommended', 'stylelint-prettier/recommended'],
|
|
4
4
|
plugins: ['./function-url-no-absolute', './use-tokens'],
|
|
5
|
+
overrides: [
|
|
6
|
+
{
|
|
7
|
+
files: ['*.scss', '**/*.scss'],
|
|
8
|
+
customSyntax: 'postcss-scss',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
files: ['*.less', '**/*.less'],
|
|
12
|
+
customSyntax: 'postcss-less',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
5
15
|
rules: {
|
|
16
|
+
'function-no-unknown': [
|
|
17
|
+
true,
|
|
18
|
+
{
|
|
19
|
+
/*
|
|
20
|
+
* these are all less functions at the moment, see the full list here https://lesscss.org/functions/
|
|
21
|
+
* 'extend' and '-' are also added to the list as they are identified as functions thought they are not
|
|
22
|
+
*/
|
|
23
|
+
ignoreFunctions: [
|
|
24
|
+
'extend',
|
|
25
|
+
'-',
|
|
26
|
+
'if',
|
|
27
|
+
'boolean',
|
|
28
|
+
'escape',
|
|
29
|
+
'e',
|
|
30
|
+
'%',
|
|
31
|
+
'replace',
|
|
32
|
+
'length',
|
|
33
|
+
'extract',
|
|
34
|
+
'range',
|
|
35
|
+
'each',
|
|
36
|
+
'ceil',
|
|
37
|
+
'floor',
|
|
38
|
+
'percentage',
|
|
39
|
+
'round',
|
|
40
|
+
'sqrt',
|
|
41
|
+
'abs',
|
|
42
|
+
'sin',
|
|
43
|
+
'asin',
|
|
44
|
+
'cos',
|
|
45
|
+
'acos',
|
|
46
|
+
'tan',
|
|
47
|
+
'atan',
|
|
48
|
+
'pi',
|
|
49
|
+
'pow',
|
|
50
|
+
'mod',
|
|
51
|
+
'min',
|
|
52
|
+
'max',
|
|
53
|
+
'isnumber',
|
|
54
|
+
'isstring',
|
|
55
|
+
'iscolor',
|
|
56
|
+
'iskeyword',
|
|
57
|
+
'isurl',
|
|
58
|
+
'ispixel',
|
|
59
|
+
'isem',
|
|
60
|
+
'ispercentage',
|
|
61
|
+
'isunit',
|
|
62
|
+
'isruleset',
|
|
63
|
+
'isdefined',
|
|
64
|
+
'color',
|
|
65
|
+
'image-size',
|
|
66
|
+
'image-width',
|
|
67
|
+
'image-height',
|
|
68
|
+
'convert',
|
|
69
|
+
'data-uri',
|
|
70
|
+
'default',
|
|
71
|
+
'unit',
|
|
72
|
+
'get-unit',
|
|
73
|
+
'svg-gradient',
|
|
74
|
+
'rgb',
|
|
75
|
+
'rgba',
|
|
76
|
+
'argb',
|
|
77
|
+
'hsl',
|
|
78
|
+
'hsla',
|
|
79
|
+
'hsv',
|
|
80
|
+
'hsva',
|
|
81
|
+
'hue',
|
|
82
|
+
'saturation',
|
|
83
|
+
'lightness',
|
|
84
|
+
'hsvhue',
|
|
85
|
+
'hsvsaturation',
|
|
86
|
+
'hsvvalue',
|
|
87
|
+
'red',
|
|
88
|
+
'green',
|
|
89
|
+
'blue',
|
|
90
|
+
'alpha',
|
|
91
|
+
'luma',
|
|
92
|
+
'luminance',
|
|
93
|
+
'saturate',
|
|
94
|
+
'desaturate',
|
|
95
|
+
'lighten',
|
|
96
|
+
'darken',
|
|
97
|
+
'fadein',
|
|
98
|
+
'fadeout',
|
|
99
|
+
'fade',
|
|
100
|
+
'spin',
|
|
101
|
+
'mix',
|
|
102
|
+
'tint',
|
|
103
|
+
'shade',
|
|
104
|
+
'greyscale',
|
|
105
|
+
'contrast',
|
|
106
|
+
'multiply',
|
|
107
|
+
'screen',
|
|
108
|
+
'overlay',
|
|
109
|
+
'softlight',
|
|
110
|
+
'hardlight',
|
|
111
|
+
'difference',
|
|
112
|
+
'exclusion',
|
|
113
|
+
'average',
|
|
114
|
+
'negation',
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
],
|
|
6
118
|
'selector-pseudo-class-no-unknown': [
|
|
7
119
|
true,
|
|
8
120
|
{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,iBAAS;IACL,OAAO,EAAE,CAAC,8BAA8B,EAAE,gCAAgC,CAAC;IAC3E,OAAO,EAAE,CAAC,4BAA4B,EAAE,cAAc,CAAC;IACvD,KAAK,EAAE;QACH,kCAAkC,EAAE;YAChC,IAAI;YACJ;gBACI,mBAAmB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;aAC3C;SACJ;QACD,wCAAwC,EAAE,IAAI;QAC9C,0BAA0B,EAAE,IAAI;QAChC,oCAAoC,EAAE,IAAI,EAAE,sHAAsH;KACrK;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,iBAAS;IACL,OAAO,EAAE,CAAC,8BAA8B,EAAE,gCAAgC,CAAC;IAC3E,OAAO,EAAE,CAAC,4BAA4B,EAAE,cAAc,CAAC;IACvD,SAAS,EAAE;QACP;YACI,KAAK,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;YAC9B,YAAY,EAAE,cAAc;SAC/B;QACD;YACI,KAAK,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;YAC9B,YAAY,EAAE,cAAc;SAC/B;KACJ;IACD,KAAK,EAAE;QACH,qBAAqB,EAAE;YACnB,IAAI;YACJ;gBACI;;;mBAGG;gBACH,eAAe,EAAE;oBACb,QAAQ;oBACR,GAAG;oBACH,IAAI;oBACJ,SAAS;oBACT,QAAQ;oBACR,GAAG;oBACH,GAAG;oBACH,SAAS;oBACT,QAAQ;oBACR,SAAS;oBACT,OAAO;oBACP,MAAM;oBACN,MAAM;oBACN,OAAO;oBACP,YAAY;oBACZ,OAAO;oBACP,MAAM;oBACN,KAAK;oBACL,KAAK;oBACL,MAAM;oBACN,KAAK;oBACL,MAAM;oBACN,KAAK;oBACL,MAAM;oBACN,IAAI;oBACJ,KAAK;oBACL,KAAK;oBACL,KAAK;oBACL,KAAK;oBACL,UAAU;oBACV,UAAU;oBACV,SAAS;oBACT,WAAW;oBACX,OAAO;oBACP,SAAS;oBACT,MAAM;oBACN,cAAc;oBACd,QAAQ;oBACR,WAAW;oBACX,WAAW;oBACX,OAAO;oBACP,YAAY;oBACZ,aAAa;oBACb,cAAc;oBACd,SAAS;oBACT,UAAU;oBACV,SAAS;oBACT,MAAM;oBACN,UAAU;oBACV,cAAc;oBACd,KAAK;oBACL,MAAM;oBACN,MAAM;oBACN,KAAK;oBACL,MAAM;oBACN,KAAK;oBACL,MAAM;oBACN,KAAK;oBACL,YAAY;oBACZ,WAAW;oBACX,QAAQ;oBACR,eAAe;oBACf,UAAU;oBACV,KAAK;oBACL,OAAO;oBACP,MAAM;oBACN,OAAO;oBACP,MAAM;oBACN,WAAW;oBACX,UAAU;oBACV,YAAY;oBACZ,SAAS;oBACT,QAAQ;oBACR,QAAQ;oBACR,SAAS;oBACT,MAAM;oBACN,MAAM;oBACN,KAAK;oBACL,MAAM;oBACN,OAAO;oBACP,WAAW;oBACX,UAAU;oBACV,UAAU;oBACV,QAAQ;oBACR,SAAS;oBACT,WAAW;oBACX,WAAW;oBACX,YAAY;oBACZ,WAAW;oBACX,SAAS;oBACT,UAAU;iBACb;aACJ;SACJ;QACD,kCAAkC,EAAE;YAChC,IAAI;YACJ;gBACI,mBAAmB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;aAC3C;SACJ;QACD,wCAAwC,EAAE,IAAI;QAC9C,0BAA0B,EAAE,IAAI;QAChC,oCAAoC,EAAE,IAAI,EAAE,sHAAsH;KACrK;CACe,CAAC"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Rule } from 'stylelint';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
ruleName: string;
|
|
4
|
+
rule: Rule<any, any>;
|
|
5
|
+
} & {
|
|
6
|
+
ruleName: string;
|
|
7
|
+
messages: {
|
|
8
|
+
variableExpected: (expected: string, found: string) => string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
2
11
|
export = _default;
|
|
3
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use-tokens/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use-tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,WAAW,CAAC;;;;;;;;;;AAoKtD,kBAA+E"}
|
package/dist/use-tokens/index.js
CHANGED
|
@@ -108,5 +108,7 @@ const plugin = (_0, _1, context) => {
|
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
+
plugin.ruleName = ruleName;
|
|
112
|
+
plugin.messages = messages;
|
|
111
113
|
module.exports = Object.assign((0, stylelint_1.createPlugin)(ruleName, plugin), { ruleName, messages });
|
|
112
114
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/use-tokens/index.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/use-tokens/index.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,kDAA0B;AAE1B,qCAUkB;AAElB,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAC5C,MAAM,QAAQ,GAAG,iBAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;IAC1C,gBAAgB,EAAE,CAAC,QAAgB,EAAE,KAAa,EAAE,EAAE,CAClD,mBAAmB,QAAQ,4DAA4D,KAAK,IAAI;CACvG,CAAC,CAAC;AAEH,MAAM,MAAM,GAAS,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;IACrC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;;QACpB,MAAM,SAAS,GAAG,MAAA,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,IAAI,0CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,0CAAE,WAAW,EAAE,CAAC;QAErE,SAAS,iBAAiB,CAAC,GAAW;YAClC,QAAQ,SAAS,EAAE;gBACf,KAAK,MAAM;oBACP,OAAO,IAAI,GAAG,EAAE,CAAC;gBAErB,KAAK,MAAM,CAAC;gBACZ,KAAK,MAAM;oBACP,OAAO,IAAI,GAAG,EAAE,CAAC;gBAErB;oBACI,OAAO,SAAS,GAAG,GAAG,CAAC;aAC9B;QACL,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;YAClB,SAAS,IAAI,C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,CAAC;AAC3B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAE3B,iBAAS,MAAM,CAAC,MAAM,CAAC,IAAA,wBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/stylelint-config",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/eslint-stylelint-configurations",
|
|
6
6
|
"repository": {
|
|
@@ -17,20 +17,23 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"color": "~4.2.3",
|
|
19
19
|
"lodash": "~4.17.21",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"stylelint-prettier": "~
|
|
20
|
+
"postcss-less": "~6.0.0",
|
|
21
|
+
"postcss-sass": "~0.5.0",
|
|
22
|
+
"stylelint-config-prettier": "~9.0.5",
|
|
23
|
+
"stylelint-config-standard": "~29.0.0",
|
|
24
|
+
"stylelint-prettier": "~2.0.0"
|
|
23
25
|
},
|
|
24
26
|
"devDependencies": {
|
|
25
27
|
"@servicetitan/tokens": "~12.2.1",
|
|
26
28
|
"@types/color": "~3.0.3",
|
|
27
29
|
"@types/lodash": "~4.14.178",
|
|
28
30
|
"@types/stylelint": "~13.13.3",
|
|
29
|
-
"stylelint": "~
|
|
31
|
+
"stylelint": "~14.16.1"
|
|
30
32
|
},
|
|
31
33
|
"peerDependencies": {
|
|
32
34
|
"@servicetitan/tokens": "*12.2.1",
|
|
33
|
-
"
|
|
35
|
+
"postcss": "^8.3.5",
|
|
36
|
+
"stylelint": "~14.16.1"
|
|
34
37
|
},
|
|
35
38
|
"publishConfig": {
|
|
36
39
|
"access": "public"
|
|
@@ -38,5 +41,5 @@
|
|
|
38
41
|
"cli": {
|
|
39
42
|
"webpack": false
|
|
40
43
|
},
|
|
41
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "489e88cd846578d92cb9d40e3c61c9ba7cb1ad13"
|
|
42
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rule, createPlugin, utils } from 'stylelint';
|
|
2
2
|
|
|
3
3
|
import trim from 'lodash/trim';
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ const messages = utils.ruleMessages(ruleName, {
|
|
|
15
15
|
rejected: 'Unexpected absolute url',
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const plugin:
|
|
18
|
+
const plugin: Rule = actual => {
|
|
19
19
|
return (root, result) => {
|
|
20
20
|
const validOptions = utils.validateOptions(result, ruleName, { actual });
|
|
21
21
|
|
|
@@ -43,4 +43,7 @@ const plugin: Plugin = actual => {
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
plugin.ruleName = ruleName;
|
|
47
|
+
plugin.messages = messages;
|
|
48
|
+
|
|
46
49
|
export = Object.assign(createPlugin(ruleName, plugin), { ruleName, messages });
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,121 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from 'stylelint';
|
|
2
2
|
|
|
3
3
|
export = {
|
|
4
4
|
extends: ['stylelint-config-recommended', 'stylelint-prettier/recommended'],
|
|
5
5
|
plugins: ['./function-url-no-absolute', './use-tokens'],
|
|
6
|
+
overrides: [
|
|
7
|
+
{
|
|
8
|
+
files: ['*.scss', '**/*.scss'],
|
|
9
|
+
customSyntax: 'postcss-scss',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: ['*.less', '**/*.less'],
|
|
13
|
+
customSyntax: 'postcss-less',
|
|
14
|
+
},
|
|
15
|
+
],
|
|
6
16
|
rules: {
|
|
17
|
+
'function-no-unknown': [
|
|
18
|
+
true,
|
|
19
|
+
{
|
|
20
|
+
/*
|
|
21
|
+
* these are all less functions at the moment, see the full list here https://lesscss.org/functions/
|
|
22
|
+
* 'extend' and '-' are also added to the list as they are identified as functions thought they are not
|
|
23
|
+
*/
|
|
24
|
+
ignoreFunctions: [
|
|
25
|
+
'extend',
|
|
26
|
+
'-',
|
|
27
|
+
'if',
|
|
28
|
+
'boolean',
|
|
29
|
+
'escape',
|
|
30
|
+
'e',
|
|
31
|
+
'%',
|
|
32
|
+
'replace',
|
|
33
|
+
'length',
|
|
34
|
+
'extract',
|
|
35
|
+
'range',
|
|
36
|
+
'each',
|
|
37
|
+
'ceil',
|
|
38
|
+
'floor',
|
|
39
|
+
'percentage',
|
|
40
|
+
'round',
|
|
41
|
+
'sqrt',
|
|
42
|
+
'abs',
|
|
43
|
+
'sin',
|
|
44
|
+
'asin',
|
|
45
|
+
'cos',
|
|
46
|
+
'acos',
|
|
47
|
+
'tan',
|
|
48
|
+
'atan',
|
|
49
|
+
'pi',
|
|
50
|
+
'pow',
|
|
51
|
+
'mod',
|
|
52
|
+
'min',
|
|
53
|
+
'max',
|
|
54
|
+
'isnumber',
|
|
55
|
+
'isstring',
|
|
56
|
+
'iscolor',
|
|
57
|
+
'iskeyword',
|
|
58
|
+
'isurl',
|
|
59
|
+
'ispixel',
|
|
60
|
+
'isem',
|
|
61
|
+
'ispercentage',
|
|
62
|
+
'isunit',
|
|
63
|
+
'isruleset',
|
|
64
|
+
'isdefined',
|
|
65
|
+
'color',
|
|
66
|
+
'image-size',
|
|
67
|
+
'image-width',
|
|
68
|
+
'image-height',
|
|
69
|
+
'convert',
|
|
70
|
+
'data-uri',
|
|
71
|
+
'default',
|
|
72
|
+
'unit',
|
|
73
|
+
'get-unit',
|
|
74
|
+
'svg-gradient',
|
|
75
|
+
'rgb',
|
|
76
|
+
'rgba',
|
|
77
|
+
'argb',
|
|
78
|
+
'hsl',
|
|
79
|
+
'hsla',
|
|
80
|
+
'hsv',
|
|
81
|
+
'hsva',
|
|
82
|
+
'hue',
|
|
83
|
+
'saturation',
|
|
84
|
+
'lightness',
|
|
85
|
+
'hsvhue',
|
|
86
|
+
'hsvsaturation',
|
|
87
|
+
'hsvvalue',
|
|
88
|
+
'red',
|
|
89
|
+
'green',
|
|
90
|
+
'blue',
|
|
91
|
+
'alpha',
|
|
92
|
+
'luma',
|
|
93
|
+
'luminance',
|
|
94
|
+
'saturate',
|
|
95
|
+
'desaturate',
|
|
96
|
+
'lighten',
|
|
97
|
+
'darken',
|
|
98
|
+
'fadein',
|
|
99
|
+
'fadeout',
|
|
100
|
+
'fade',
|
|
101
|
+
'spin',
|
|
102
|
+
'mix',
|
|
103
|
+
'tint',
|
|
104
|
+
'shade',
|
|
105
|
+
'greyscale',
|
|
106
|
+
'contrast',
|
|
107
|
+
'multiply',
|
|
108
|
+
'screen',
|
|
109
|
+
'overlay',
|
|
110
|
+
'softlight',
|
|
111
|
+
'hardlight',
|
|
112
|
+
'difference',
|
|
113
|
+
'exclusion',
|
|
114
|
+
'average',
|
|
115
|
+
'negation',
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
],
|
|
7
119
|
'selector-pseudo-class-no-unknown': [
|
|
8
120
|
true,
|
|
9
121
|
{
|
|
@@ -14,4 +126,4 @@ export = {
|
|
|
14
126
|
'@servicetitan/use-tokens': true,
|
|
15
127
|
'no-invalid-position-at-import-rule': null, // Not supported for LESS/SASS. Enable for CSS when https://github.com/stylelint/stylelint/issues/3128 is implemented.
|
|
16
128
|
},
|
|
17
|
-
} as Partial<
|
|
129
|
+
} as Partial<Config>;
|
package/src/use-tokens/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rule, createPlugin, utils } from 'stylelint';
|
|
2
2
|
|
|
3
3
|
import Color from 'color';
|
|
4
4
|
|
|
@@ -14,17 +14,13 @@ import {
|
|
|
14
14
|
fontFamilies,
|
|
15
15
|
} from './values';
|
|
16
16
|
|
|
17
|
-
type Plugin = (
|
|
18
|
-
...args: [...Parameters<OriginalPlugin>, { fix: boolean }]
|
|
19
|
-
) => ReturnType<OriginalPlugin>;
|
|
20
|
-
|
|
21
17
|
const ruleName = '@servicetitan/use-tokens';
|
|
22
18
|
const messages = utils.ruleMessages(ruleName, {
|
|
23
19
|
variableExpected: (expected: string, found: string) =>
|
|
24
20
|
`You should use "${expected}" variable from the \`@servicetitan/tokens\` instead of "${found}".`,
|
|
25
21
|
});
|
|
26
22
|
|
|
27
|
-
const plugin:
|
|
23
|
+
const plugin: Rule = (_0, _1, context) => {
|
|
28
24
|
return (root, result) => {
|
|
29
25
|
const extension = result.opts?.from?.split('.').pop()?.toLowerCase();
|
|
30
26
|
|
|
@@ -163,4 +159,7 @@ const plugin: Plugin = (_0, _1, context) => {
|
|
|
163
159
|
};
|
|
164
160
|
};
|
|
165
161
|
|
|
166
|
-
|
|
162
|
+
plugin.ruleName = ruleName;
|
|
163
|
+
plugin.messages = messages;
|
|
164
|
+
|
|
165
|
+
export = Object.assign(createPlugin(ruleName, plugin), { ruleName, messages });
|