@htyf-mp/stylelint-taro-rn 0.6.0 → 0.7.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/index.cjs +456 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.esm.js +345 -260
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -10
- package/dist/index.cjs.js +0 -373
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -10
- package/dist/index.js.map +0 -1
- package/dist/rules/css-property-no-unknown/index.d.ts +0 -5
- package/dist/rules/css-property-no-unknown/index.js +0 -62
- package/dist/rules/css-property-no-unknown/index.js.map +0 -1
- package/dist/rules/font-weight-no-ignored-values/index.d.ts +0 -5
- package/dist/rules/font-weight-no-ignored-values/index.js +0 -36
- package/dist/rules/font-weight-no-ignored-values/index.js.map +0 -1
- package/dist/rules/index.d.ts +0 -11
- package/dist/rules/index.js +0 -14
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/line-height-no-value-without-unit/index.d.ts +0 -5
- package/dist/rules/line-height-no-value-without-unit/index.js +0 -37
- package/dist/rules/line-height-no-value-without-unit/index.js.map +0 -1
- package/dist/rules/style-property-no-unknown/index.d.ts +0 -5
- package/dist/rules/style-property-no-unknown/index.js +0 -58
- package/dist/rules/style-property-no-unknown/index.js.map +0 -1
- package/dist/utils/endsWith.d.ts +0 -1
- package/dist/utils/endsWith.js +0 -4
- package/dist/utils/endsWith.js.map +0 -1
- package/dist/utils/hasInterpolation.d.ts +0 -7
- package/dist/utils/hasInterpolation.js +0 -22
- package/dist/utils/hasInterpolation.js.map +0 -1
- package/dist/utils/hasLessInterpolation.d.ts +0 -7
- package/dist/utils/hasLessInterpolation.js +0 -15
- package/dist/utils/hasLessInterpolation.js.map +0 -1
- package/dist/utils/hasPsvInterpolation.d.ts +0 -4
- package/dist/utils/hasPsvInterpolation.js +0 -12
- package/dist/utils/hasPsvInterpolation.js.map +0 -1
- package/dist/utils/hasScssInterpolation.d.ts +0 -4
- package/dist/utils/hasScssInterpolation.js +0 -12
- package/dist/utils/hasScssInterpolation.js.map +0 -1
- package/dist/utils/index.d.ts +0 -13
- package/dist/utils/isCustomProperty.d.ts +0 -4
- package/dist/utils/isCustomProperty.js +0 -9
- package/dist/utils/isCustomProperty.js.map +0 -1
- package/dist/utils/isExportBlock.d.ts +0 -4
- package/dist/utils/isExportBlock.js +0 -12
- package/dist/utils/isExportBlock.js.map +0 -1
- package/dist/utils/isStandardSyntaxDeclaration.d.ts +0 -4
- package/dist/utils/isStandardSyntaxDeclaration.js +0 -29
- package/dist/utils/isStandardSyntaxDeclaration.js.map +0 -1
- package/dist/utils/isStandardSyntaxProperty.d.ts +0 -4
- package/dist/utils/isStandardSyntaxProperty.js +0 -28
- package/dist/utils/isStandardSyntaxProperty.js.map +0 -1
- package/dist/utils/isString.d.ts +0 -1
- package/dist/utils/isString.js +0 -4
- package/dist/utils/isString.js.map +0 -1
- package/dist/utils/kebabCase.d.ts +0 -1
- package/dist/utils/kebabCase.js +0 -4
- package/dist/utils/kebabCase.js.map +0 -1
- package/dist/utils/matchesStringOrRegExp.d.ts +0 -12
- package/dist/utils/matchesStringOrRegExp.js +0 -60
- package/dist/utils/matchesStringOrRegExp.js.map +0 -1
- package/dist/utils/namespace.d.ts +0 -1
- package/dist/utils/namespace.js +0 -7
- package/dist/utils/namespace.js.map +0 -1
- package/dist/utils/optionsMatches.d.ts +0 -5
- package/dist/utils/optionsMatches.js +0 -15
- package/dist/utils/optionsMatches.js.map +0 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var stylelint = require('stylelint');
|
|
4
|
+
var reactNativeKnownStylingProperties = require('react-native-known-styling-properties');
|
|
5
|
+
|
|
6
|
+
const endsWith = (str, suffix) =>
|
|
7
|
+
str.indexOf(suffix, str.length - suffix.length) !== -1;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Check whether a string has less interpolation
|
|
11
|
+
*
|
|
12
|
+
* @param {string} string
|
|
13
|
+
* @return {boolean} If `true`, a string has less interpolation
|
|
14
|
+
*/
|
|
15
|
+
function hasLessInterpolation (string /*: string */) /*: boolean */ {
|
|
16
|
+
if (/@{.+?}/.test(string)) {
|
|
17
|
+
return true
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return false
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Check whether a string has postcss-simple-vars interpolation
|
|
25
|
+
*/
|
|
26
|
+
function hasPsvInterpolation (string /*: string */) /*: boolean */ {
|
|
27
|
+
if (/\$\(.+?\)/.test(string)) {
|
|
28
|
+
return true
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Check whether a string has scss interpolation
|
|
36
|
+
*/
|
|
37
|
+
function hasScssInterpolation (string /*: string */) /*: boolean */ {
|
|
38
|
+
if (/#{.+?}/.test(string)) {
|
|
39
|
+
return true
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return false
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Check whether a string has interpolation
|
|
47
|
+
*
|
|
48
|
+
* @param {string} string
|
|
49
|
+
* @return {boolean} If `true`, a string has interpolation
|
|
50
|
+
*/
|
|
51
|
+
function hasInterpolation (string /*: string */) /*: boolean */ {
|
|
52
|
+
// SCSS or Less interpolation
|
|
53
|
+
if (
|
|
54
|
+
hasLessInterpolation(string) ||
|
|
55
|
+
hasScssInterpolation(string) ||
|
|
56
|
+
hasPsvInterpolation(string)
|
|
57
|
+
) {
|
|
58
|
+
return true
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return false
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Check whether a property is a custom one
|
|
66
|
+
*/
|
|
67
|
+
function isCustomProperty (property /*: string */) /*: boolean */ {
|
|
68
|
+
return property.slice(0, 2) === '--'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check whether a node is an :export block
|
|
73
|
+
*/
|
|
74
|
+
function isExportBlock (node /*: Object */) /*: boolean */ {
|
|
75
|
+
if (node.type === 'rule' && node.selector && node.selector === ':export') {
|
|
76
|
+
return true
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return false
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check whether a declaration is standard
|
|
84
|
+
*/
|
|
85
|
+
function isStandardSyntaxDeclaration (decl /*: Object */) /*: boolean */ {
|
|
86
|
+
const prop = decl.prop;
|
|
87
|
+
const parent = decl.parent;
|
|
88
|
+
|
|
89
|
+
// Declarations belong in a declaration block
|
|
90
|
+
|
|
91
|
+
if (parent.type === 'root') {
|
|
92
|
+
return false
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Sass var (e.g. $var: x), nested list (e.g. $list: (x)) or nested map (e.g. $map: (key:value))
|
|
96
|
+
if (prop[0] === '$') {
|
|
97
|
+
return false
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Less var (e.g. @var: x), but exclude variable interpolation (e.g. @{var})
|
|
101
|
+
if (prop[0] === '@' && prop[1] !== '{') {
|
|
102
|
+
return false
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Sass nested properties (e.g. border: { style: solid; color: red; })
|
|
106
|
+
if (
|
|
107
|
+
parent.selector &&
|
|
108
|
+
parent.selector[parent.selector.length - 1] === ':' &&
|
|
109
|
+
parent.selector.substring(0, 2) !== '--'
|
|
110
|
+
) {
|
|
111
|
+
return false
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Check whether a property is standard
|
|
119
|
+
*/
|
|
120
|
+
function isStandardSyntaxProperty (
|
|
121
|
+
property /*: string */
|
|
122
|
+
) /*: boolean */ {
|
|
123
|
+
// SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value))
|
|
124
|
+
if (property[0] === '$') {
|
|
125
|
+
return false
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Less var (e.g. @var: x)
|
|
129
|
+
if (property[0] === '@') {
|
|
130
|
+
return false
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Less append property value with space (e.g. transform+_: scale(2))
|
|
134
|
+
if (endsWith(property, '+') || endsWith(property, '+_')) {
|
|
135
|
+
return false
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// SCSS or Less interpolation
|
|
139
|
+
if (hasInterpolation(property)) {
|
|
140
|
+
return false
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return true
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const isString = string => typeof string === 'string';
|
|
147
|
+
|
|
148
|
+
const kebabCase = string =>
|
|
149
|
+
string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
150
|
+
|
|
151
|
+
const prefix = 'taro-rn';
|
|
152
|
+
|
|
153
|
+
function namespace (ruleName) {
|
|
154
|
+
return `${prefix}/${ruleName}`
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Compares a string to a second value that, if it fits a certain convention,
|
|
159
|
+
* is converted to a regular expression before the comparison.
|
|
160
|
+
* If it doesn't fit the convention, then two strings are compared.
|
|
161
|
+
*
|
|
162
|
+
* Any strings starting and ending with `/` are interpreted
|
|
163
|
+
* as regular expressions.
|
|
164
|
+
*/
|
|
165
|
+
function matchesStringOrRegExp (
|
|
166
|
+
input /*: string | Array<string> */,
|
|
167
|
+
comparison /*: string | Array<string> */
|
|
168
|
+
) /*: false | { match: string, pattern: string } */ {
|
|
169
|
+
if (!Array.isArray(input)) {
|
|
170
|
+
return testAgainstStringOrRegExpOrArray(input, comparison)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
for (const inputItem of input) {
|
|
174
|
+
const testResult = testAgainstStringOrRegExpOrArray(inputItem, comparison);
|
|
175
|
+
if (testResult) {
|
|
176
|
+
return testResult
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return false
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function testAgainstStringOrRegExpOrArray (value, comparison) {
|
|
184
|
+
if (!Array.isArray(comparison)) {
|
|
185
|
+
return testAgainstStringOrRegExp(value, comparison)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
for (const comparisonItem of comparison) {
|
|
189
|
+
const testResult = testAgainstStringOrRegExp(value, comparisonItem);
|
|
190
|
+
if (testResult) {
|
|
191
|
+
return testResult
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return false
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function testAgainstStringOrRegExp (value, comparison) {
|
|
198
|
+
// If it's a RegExp, test directly
|
|
199
|
+
if (comparison instanceof RegExp) {
|
|
200
|
+
return comparison.test(value)
|
|
201
|
+
? { match: value, pattern: comparison }
|
|
202
|
+
: false
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Check if it's RegExp in a string
|
|
206
|
+
const firstComparisonChar = comparison[0];
|
|
207
|
+
const lastComparisonChar = comparison[comparison.length - 1];
|
|
208
|
+
const secondToLastComparisonChar = comparison[comparison.length - 2];
|
|
209
|
+
|
|
210
|
+
const comparisonIsRegex =
|
|
211
|
+
firstComparisonChar === '/' &&
|
|
212
|
+
(lastComparisonChar === '/' ||
|
|
213
|
+
(secondToLastComparisonChar === '/' && lastComparisonChar === 'i'));
|
|
214
|
+
|
|
215
|
+
const hasCaseInsensitiveFlag =
|
|
216
|
+
comparisonIsRegex && lastComparisonChar === 'i';
|
|
217
|
+
|
|
218
|
+
// If so, create a new RegExp from it
|
|
219
|
+
if (comparisonIsRegex) {
|
|
220
|
+
const valueMatches = hasCaseInsensitiveFlag
|
|
221
|
+
? new RegExp(comparison.slice(1, -2), 'i').test(value)
|
|
222
|
+
: new RegExp(comparison.slice(1, -1)).test(value);
|
|
223
|
+
return valueMatches ? { match: value, pattern: comparison } : false
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Otherwise, it's a string. Do a strict comparison
|
|
227
|
+
return value === comparison ? { match: value, pattern: comparison } : false
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Check if an options object's propertyName contains a user-defined string or
|
|
232
|
+
* regex that matches the passed in input.
|
|
233
|
+
*/
|
|
234
|
+
function optionsMatches (
|
|
235
|
+
options /*: Object */,
|
|
236
|
+
propertyName /*: string */,
|
|
237
|
+
input /*: string */
|
|
238
|
+
) /*: boolean */ {
|
|
239
|
+
return !!(
|
|
240
|
+
options &&
|
|
241
|
+
options[propertyName] &&
|
|
242
|
+
typeof input === 'string' &&
|
|
243
|
+
matchesStringOrRegExp(input, options[propertyName])
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const ruleName$3 = namespace('css-property-no-unknown');
|
|
248
|
+
|
|
249
|
+
const messages$3 = stylelint.utils.ruleMessages(ruleName$3, {
|
|
250
|
+
rejected: (property) => `无效的 React Native 样式属性 "${property}"`
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
const props$1 = new Set(reactNativeKnownStylingProperties.allCSS2RNProps.map(kebabCase));
|
|
254
|
+
|
|
255
|
+
function cssPropertyNoUnknown (actual, options) {
|
|
256
|
+
return function (root, result) {
|
|
257
|
+
const validOptions = stylelint.utils.validateOptions(
|
|
258
|
+
result,
|
|
259
|
+
ruleName$3,
|
|
260
|
+
{
|
|
261
|
+
actual
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
actual: options,
|
|
265
|
+
possible: {
|
|
266
|
+
ignoreProperties: [isString]
|
|
267
|
+
},
|
|
268
|
+
optional: true
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
if (!validOptions) {
|
|
273
|
+
return
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
root.walkDecls((decl) => {
|
|
277
|
+
const prop = decl.prop;
|
|
278
|
+
|
|
279
|
+
if (!isStandardSyntaxProperty(prop)) {
|
|
280
|
+
return
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (!isStandardSyntaxDeclaration(decl)) {
|
|
284
|
+
return
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (isCustomProperty(prop)) {
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (isExportBlock(decl.parent)) {
|
|
292
|
+
return
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (optionsMatches(options, 'ignoreProperties', prop)) {
|
|
296
|
+
return
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (props$1.has(prop.toLowerCase())) {
|
|
300
|
+
return
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
stylelint.utils.report({
|
|
304
|
+
message: messages$3.rejected(prop),
|
|
305
|
+
node: decl,
|
|
306
|
+
result,
|
|
307
|
+
ruleName: ruleName$3
|
|
308
|
+
});
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const ruleName$2 = namespace('font-weight-no-ignored-values');
|
|
314
|
+
|
|
315
|
+
const messages$2 = stylelint.utils.ruleMessages(ruleName$2, {
|
|
316
|
+
rejected: (weight) => `Unexpected font-weight "${weight}"`
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
const acceptedWeights = ['400', '700', 'normal', 'bold'];
|
|
320
|
+
|
|
321
|
+
function fontWeightNoIgnoredValues (actual) {
|
|
322
|
+
return function (root, result) {
|
|
323
|
+
const validOptions = stylelint.utils.validateOptions(result, ruleName$2, {
|
|
324
|
+
actual
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
if (!validOptions) {
|
|
328
|
+
return
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
root.walkDecls(/^font-weight$/i, (decl) => {
|
|
332
|
+
if (acceptedWeights.indexOf(decl.value) > -1) {
|
|
333
|
+
return
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
stylelint.utils.report({
|
|
337
|
+
message: messages$2.rejected(decl.value),
|
|
338
|
+
node: decl,
|
|
339
|
+
result,
|
|
340
|
+
ruleName: ruleName$2,
|
|
341
|
+
word: decl.value
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const ruleName$1 = namespace('line-height-no-value-without-unit');
|
|
348
|
+
|
|
349
|
+
const messages$1 = stylelint.utils.ruleMessages(ruleName$1, {
|
|
350
|
+
rejected: (height) =>
|
|
351
|
+
`Unexpected line-height "${height}", expect a value with units`
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
const lengthRe = /^(?:0|[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?(?:px|rem|vh|vw|vmin|vmax))$/i;
|
|
355
|
+
|
|
356
|
+
function lineHeightNoValueWithoutUnit (actual) {
|
|
357
|
+
return function (root, result) {
|
|
358
|
+
const validOptions = stylelint.utils.validateOptions(result, ruleName$1, {
|
|
359
|
+
actual
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
if (!validOptions) {
|
|
363
|
+
return
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
root.walkDecls(/^line-height$/i, (decl) => {
|
|
367
|
+
if (lengthRe.test(decl.value)) {
|
|
368
|
+
return
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
stylelint.utils.report({
|
|
372
|
+
message: messages$1.rejected(decl.value),
|
|
373
|
+
node: decl,
|
|
374
|
+
result,
|
|
375
|
+
ruleName: ruleName$1,
|
|
376
|
+
word: decl.value
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const ruleName = namespace('style-property-no-unknown');
|
|
383
|
+
|
|
384
|
+
const messages = stylelint.utils.ruleMessages(ruleName, {
|
|
385
|
+
rejected: (property) => `无效的 React Native 样式属性 "${property}"`
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
const props = new Set(reactNativeKnownStylingProperties.allProps.map(kebabCase));
|
|
389
|
+
|
|
390
|
+
function stylePropertyNoUnknown (actual, options) {
|
|
391
|
+
return function (root, result) {
|
|
392
|
+
const validOptions = stylelint.utils.validateOptions(
|
|
393
|
+
result,
|
|
394
|
+
ruleName,
|
|
395
|
+
{
|
|
396
|
+
actual
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
actual: options,
|
|
400
|
+
possible: {
|
|
401
|
+
ignoreProperties: [isString]
|
|
402
|
+
},
|
|
403
|
+
optional: true
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
|
|
407
|
+
if (!validOptions) {
|
|
408
|
+
return
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
root.walkDecls((decl) => {
|
|
412
|
+
const prop = decl.prop;
|
|
413
|
+
|
|
414
|
+
if (!isStandardSyntaxProperty(prop)) {
|
|
415
|
+
return
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
if (!isStandardSyntaxDeclaration(decl)) {
|
|
419
|
+
return
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (isCustomProperty(prop)) {
|
|
423
|
+
return
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (optionsMatches(options, 'ignoreProperties', prop)) {
|
|
427
|
+
return
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (props.has(prop.toLowerCase())) {
|
|
431
|
+
return
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
stylelint.utils.report({
|
|
435
|
+
message: messages.rejected(prop),
|
|
436
|
+
node: decl,
|
|
437
|
+
result,
|
|
438
|
+
ruleName
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
var rules = {
|
|
445
|
+
'font-weight-no-ignored-values': fontWeightNoIgnoredValues,
|
|
446
|
+
'css-property-no-unknown': cssPropertyNoUnknown,
|
|
447
|
+
'style-property-no-unknown': stylePropertyNoUnknown,
|
|
448
|
+
'line-height-no-value-without-unit': lineHeightNoValueWithoutUnit
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
const rulesPlugins = Object.keys(rules).map((ruleName) => {
|
|
452
|
+
return stylelint.createPlugin(namespace(ruleName), rules[ruleName])
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
module.exports = rulesPlugins;
|
|
456
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/utils/endsWith.js","../src/utils/hasLessInterpolation.js","../src/utils/hasPsvInterpolation.js","../src/utils/hasScssInterpolation.js","../src/utils/hasInterpolation.js","../src/utils/isCustomProperty.js","../src/utils/isExportBlock.js","../src/utils/isStandardSyntaxDeclaration.js","../src/utils/isStandardSyntaxProperty.js","../src/utils/isString.js","../src/utils/kebabCase.js","../src/utils/namespace.js","../src/utils/matchesStringOrRegExp.js","../src/utils/optionsMatches.js","../src/rules/css-property-no-unknown/index.js","../src/rules/font-weight-no-ignored-values/index.js","../src/rules/line-height-no-value-without-unit/index.js","../src/rules/style-property-no-unknown/index.js","../src/rules/index.js","../src/index.js"],"sourcesContent":["export const endsWith = (str, suffix) =>\n str.indexOf(suffix, str.length - suffix.length) !== -1\n","/**\n * Check whether a string has less interpolation\n *\n * @param {string} string\n * @return {boolean} If `true`, a string has less interpolation\n */\nexport function hasLessInterpolation (string /*: string */) /*: boolean */ {\n if (/@{.+?}/.test(string)) {\n return true\n }\n\n return false\n}\n","/**\n * Check whether a string has postcss-simple-vars interpolation\n */\nexport function hasPsvInterpolation (string /*: string */) /*: boolean */ {\n if (/\\$\\(.+?\\)/.test(string)) {\n return true\n }\n\n return false\n}\n","/**\n * Check whether a string has scss interpolation\n */\nexport function hasScssInterpolation (string /*: string */) /*: boolean */ {\n if (/#{.+?}/.test(string)) {\n return true\n }\n\n return false\n}\n","import { hasLessInterpolation } from './hasLessInterpolation.js'\nimport { hasPsvInterpolation } from './hasPsvInterpolation.js'\nimport { hasScssInterpolation } from './hasScssInterpolation.js'\n\n/**\n * Check whether a string has interpolation\n *\n * @param {string} string\n * @return {boolean} If `true`, a string has interpolation\n */\nexport function hasInterpolation (string /*: string */) /*: boolean */ {\n // SCSS or Less interpolation\n if (\n hasLessInterpolation(string) ||\n hasScssInterpolation(string) ||\n hasPsvInterpolation(string)\n ) {\n return true\n }\n\n return false\n}\n","/**\n * Check whether a property is a custom one\n */\nexport function isCustomProperty (property /*: string */) /*: boolean */ {\n return property.slice(0, 2) === '--'\n}\n","/**\n * Check whether a node is an :export block\n */\nexport function isExportBlock (node /*: Object */) /*: boolean */ {\n if (node.type === 'rule' && node.selector && node.selector === ':export') {\n return true\n }\n\n return false\n}\n","/**\n * Check whether a declaration is standard\n */\nexport function isStandardSyntaxDeclaration (decl /*: Object */) /*: boolean */ {\n const prop = decl.prop\n const parent = decl.parent\n\n // Declarations belong in a declaration block\n\n if (parent.type === 'root') {\n return false\n }\n\n // Sass var (e.g. $var: x), nested list (e.g. $list: (x)) or nested map (e.g. $map: (key:value))\n if (prop[0] === '$') {\n return false\n }\n\n // Less var (e.g. @var: x), but exclude variable interpolation (e.g. @{var})\n if (prop[0] === '@' && prop[1] !== '{') {\n return false\n }\n\n // Sass nested properties (e.g. border: { style: solid; color: red; })\n if (\n parent.selector &&\n parent.selector[parent.selector.length - 1] === ':' &&\n parent.selector.substring(0, 2) !== '--'\n ) {\n return false\n }\n\n return true\n}\n","import { endsWith } from './endsWith.js'\nimport { hasInterpolation } from './hasInterpolation.js'\n\n/**\n * Check whether a property is standard\n */\nexport function isStandardSyntaxProperty (\n property /*: string */\n) /*: boolean */ {\n // SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value))\n if (property[0] === '$') {\n return false\n }\n\n // Less var (e.g. @var: x)\n if (property[0] === '@') {\n return false\n }\n\n // Less append property value with space (e.g. transform+_: scale(2))\n if (endsWith(property, '+') || endsWith(property, '+_')) {\n return false\n }\n\n // SCSS or Less interpolation\n if (hasInterpolation(property)) {\n return false\n }\n\n return true\n}\n","export const isString = string => typeof string === 'string'\n","export const kebabCase = string =>\n string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()\n","const prefix = 'taro-rn'\n\nexport function namespace (ruleName) {\n return `${prefix}/${ruleName}`\n}\n","/**\n * Compares a string to a second value that, if it fits a certain convention,\n * is converted to a regular expression before the comparison.\n * If it doesn't fit the convention, then two strings are compared.\n *\n * Any strings starting and ending with `/` are interpreted\n * as regular expressions.\n */\nexport function matchesStringOrRegExp (\n input /*: string | Array<string> */,\n comparison /*: string | Array<string> */\n) /*: false | { match: string, pattern: string } */ {\n if (!Array.isArray(input)) {\n return testAgainstStringOrRegExpOrArray(input, comparison)\n }\n\n for (const inputItem of input) {\n const testResult = testAgainstStringOrRegExpOrArray(inputItem, comparison)\n if (testResult) {\n return testResult\n }\n }\n\n return false\n}\n\nfunction testAgainstStringOrRegExpOrArray (value, comparison) {\n if (!Array.isArray(comparison)) {\n return testAgainstStringOrRegExp(value, comparison)\n }\n\n for (const comparisonItem of comparison) {\n const testResult = testAgainstStringOrRegExp(value, comparisonItem)\n if (testResult) {\n return testResult\n }\n }\n return false\n}\n\nfunction testAgainstStringOrRegExp (value, comparison) {\n // If it's a RegExp, test directly\n if (comparison instanceof RegExp) {\n return comparison.test(value)\n ? { match: value, pattern: comparison }\n : false\n }\n\n // Check if it's RegExp in a string\n const firstComparisonChar = comparison[0]\n const lastComparisonChar = comparison[comparison.length - 1]\n const secondToLastComparisonChar = comparison[comparison.length - 2]\n\n const comparisonIsRegex =\n firstComparisonChar === '/' &&\n (lastComparisonChar === '/' ||\n (secondToLastComparisonChar === '/' && lastComparisonChar === 'i'))\n\n const hasCaseInsensitiveFlag =\n comparisonIsRegex && lastComparisonChar === 'i'\n\n // If so, create a new RegExp from it\n if (comparisonIsRegex) {\n const valueMatches = hasCaseInsensitiveFlag\n ? new RegExp(comparison.slice(1, -2), 'i').test(value)\n : new RegExp(comparison.slice(1, -1)).test(value)\n return valueMatches ? { match: value, pattern: comparison } : false\n }\n\n // Otherwise, it's a string. Do a strict comparison\n return value === comparison ? { match: value, pattern: comparison } : false\n}\n","import { matchesStringOrRegExp } from './matchesStringOrRegExp.js'\n\n/**\n * Check if an options object's propertyName contains a user-defined string or\n * regex that matches the passed in input.\n */\nexport function optionsMatches (\n options /*: Object */,\n propertyName /*: string */,\n input /*: string */\n) /*: boolean */ {\n return !!(\n options &&\n options[propertyName] &&\n typeof input === 'string' &&\n matchesStringOrRegExp(input, options[propertyName])\n )\n}\n","import { allCSS2RNProps } from 'react-native-known-styling-properties'\nimport stylelint from 'stylelint'\n\nimport {\n isCustomProperty,\n isExportBlock,\n isStandardSyntaxDeclaration,\n isStandardSyntaxProperty,\n isString,\n kebabCase,\n namespace,\n optionsMatches\n} from '../../utils/index.js'\n\nexport const ruleName = namespace('css-property-no-unknown')\n\nexport const messages = stylelint.utils.ruleMessages(ruleName, {\n rejected: (property) => `无效的 React Native 样式属性 \"${property}\"`\n})\n\nconst props = new Set(allCSS2RNProps.map(kebabCase))\n\nexport default function (actual, options) {\n return function (root, result) {\n const validOptions = stylelint.utils.validateOptions(\n result,\n ruleName,\n {\n actual\n },\n {\n actual: options,\n possible: {\n ignoreProperties: [isString]\n },\n optional: true\n }\n )\n\n if (!validOptions) {\n return\n }\n\n root.walkDecls((decl) => {\n const prop = decl.prop\n\n if (!isStandardSyntaxProperty(prop)) {\n return\n }\n\n if (!isStandardSyntaxDeclaration(decl)) {\n return\n }\n\n if (isCustomProperty(prop)) {\n return\n }\n\n if (isExportBlock(decl.parent)) {\n return\n }\n\n if (optionsMatches(options, 'ignoreProperties', prop)) {\n return\n }\n\n if (props.has(prop.toLowerCase())) {\n return\n }\n\n stylelint.utils.report({\n message: messages.rejected(prop),\n node: decl,\n result,\n ruleName\n })\n })\n }\n}\n","import stylelint from 'stylelint'\n\nimport { namespace } from '../../utils/index.js'\n\nexport const ruleName = namespace('font-weight-no-ignored-values')\n\nexport const messages = stylelint.utils.ruleMessages(ruleName, {\n rejected: (weight) => `Unexpected font-weight \"${weight}\"`\n})\n\nconst acceptedWeights = ['400', '700', 'normal', 'bold']\n\nexport default function (actual) {\n return function (root, result) {\n const validOptions = stylelint.utils.validateOptions(result, ruleName, {\n actual\n })\n\n if (!validOptions) {\n return\n }\n\n root.walkDecls(/^font-weight$/i, (decl) => {\n if (acceptedWeights.indexOf(decl.value) > -1) {\n return\n }\n\n stylelint.utils.report({\n message: messages.rejected(decl.value),\n node: decl,\n result,\n ruleName,\n word: decl.value\n })\n })\n }\n}\n","import stylelint from 'stylelint'\n\nimport { namespace } from '../../utils/index.js'\n\nexport const ruleName = namespace('line-height-no-value-without-unit')\n\nexport const messages = stylelint.utils.ruleMessages(ruleName, {\n rejected: (height) =>\n `Unexpected line-height \"${height}\", expect a value with units`\n})\n\nconst lengthRe = /^(?:0|[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?(?:px|rem|vh|vw|vmin|vmax))$/i\n\nexport default function (actual) {\n return function (root, result) {\n const validOptions = stylelint.utils.validateOptions(result, ruleName, {\n actual\n })\n\n if (!validOptions) {\n return\n }\n\n root.walkDecls(/^line-height$/i, (decl) => {\n if (lengthRe.test(decl.value)) {\n return\n }\n\n stylelint.utils.report({\n message: messages.rejected(decl.value),\n node: decl,\n result,\n ruleName,\n word: decl.value\n })\n })\n }\n}\n","import { allProps } from 'react-native-known-styling-properties'\nimport stylelint from 'stylelint'\n\nimport {\n isCustomProperty,\n isStandardSyntaxDeclaration,\n isStandardSyntaxProperty,\n isString,\n kebabCase,\n namespace,\n optionsMatches\n} from '../../utils/index.js'\n\nexport const ruleName = namespace('style-property-no-unknown')\n\nexport const messages = stylelint.utils.ruleMessages(ruleName, {\n rejected: (property) => `无效的 React Native 样式属性 \"${property}\"`\n})\n\nconst props = new Set(allProps.map(kebabCase))\n\nexport default function (actual, options) {\n return function (root, result) {\n const validOptions = stylelint.utils.validateOptions(\n result,\n ruleName,\n {\n actual\n },\n {\n actual: options,\n possible: {\n ignoreProperties: [isString]\n },\n optional: true\n }\n )\n\n if (!validOptions) {\n return\n }\n\n root.walkDecls((decl) => {\n const prop = decl.prop\n\n if (!isStandardSyntaxProperty(prop)) {\n return\n }\n\n if (!isStandardSyntaxDeclaration(decl)) {\n return\n }\n\n if (isCustomProperty(prop)) {\n return\n }\n\n if (optionsMatches(options, 'ignoreProperties', prop)) {\n return\n }\n\n if (props.has(prop.toLowerCase())) {\n return\n }\n\n stylelint.utils.report({\n message: messages.rejected(prop),\n node: decl,\n result,\n ruleName\n })\n })\n }\n}\n","import cssPropertyNoUnknown from './css-property-no-unknown/index.js'\nimport fontWeightNoIgnoredValues from './font-weight-no-ignored-values/index.js'\nimport lineHeightNoValueWithoutUnit from './line-height-no-value-without-unit/index.js'\nimport stylePropertyNoUnknown from './style-property-no-unknown/index.js'\n\nexport default {\n 'font-weight-no-ignored-values': fontWeightNoIgnoredValues,\n 'css-property-no-unknown': cssPropertyNoUnknown,\n 'style-property-no-unknown': stylePropertyNoUnknown,\n 'line-height-no-value-without-unit': lineHeightNoValueWithoutUnit\n}\n","import stylelint from 'stylelint'\n\nimport rules from './rules/index.js'\nimport { namespace } from './utils/index.js'\n\nconst rulesPlugins = Object.keys(rules).map((ruleName) => {\n return stylelint.createPlugin(namespace(ruleName), rules[ruleName])\n})\n\nexport default rulesPlugins\n"],"names":["ruleName","messages","props","allCSS2RNProps","allProps"],"mappings":";;;;;AAAO,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM;AACpC,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK;;ACDtD;AACA;AACA;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