stylelint-config-silverwind 35.0.0 → 35.0.2
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.js +55 -103
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -8898,7 +8898,7 @@ function resolveId(id2, basedir, {
|
|
|
8898
8898
|
});
|
|
8899
8899
|
}
|
|
8900
8900
|
async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
8901
|
-
let customProperties =
|
|
8901
|
+
let customProperties = {};
|
|
8902
8902
|
let sourceDir = process.cwd();
|
|
8903
8903
|
if (root2.source && root2.source.input && root2.source.input.file) {
|
|
8904
8904
|
sourceDir = path$2.dirname(root2.source.input.file);
|
|
@@ -8921,60 +8921,6 @@ async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
|
8921
8921
|
importPromises.push(promise);
|
|
8922
8922
|
}
|
|
8923
8923
|
});
|
|
8924
|
-
root2.walkAtRules("property", (atRule2) => {
|
|
8925
|
-
console.log(atRule2);
|
|
8926
|
-
const nodes = valueParser(atRule2.params).nodes;
|
|
8927
|
-
const names = [];
|
|
8928
|
-
for (let i2 = 0; i2 < nodes.length; i2++) {
|
|
8929
|
-
let node2 = nodes[i2];
|
|
8930
|
-
if (node2.type === "word" && node2.value.startsWith("--")) {
|
|
8931
|
-
names.push(node2.value);
|
|
8932
|
-
while (!(node2.type === "div" && node2.value === ",")) {
|
|
8933
|
-
i2++;
|
|
8934
|
-
node2 = nodes[i2];
|
|
8935
|
-
if (!node2) {
|
|
8936
|
-
break;
|
|
8937
|
-
}
|
|
8938
|
-
}
|
|
8939
|
-
}
|
|
8940
|
-
}
|
|
8941
|
-
const atProperty = {
|
|
8942
|
-
inherits: void 0,
|
|
8943
|
-
syntax: void 0,
|
|
8944
|
-
initialValue: void 0
|
|
8945
|
-
};
|
|
8946
|
-
atRule2.each((descriptor) => {
|
|
8947
|
-
if (descriptor.type !== "decl") {
|
|
8948
|
-
return;
|
|
8949
|
-
}
|
|
8950
|
-
switch (descriptor.prop) {
|
|
8951
|
-
case "initial-value":
|
|
8952
|
-
atProperty.initialValue = descriptor.value;
|
|
8953
|
-
return;
|
|
8954
|
-
case "syntax":
|
|
8955
|
-
atProperty.syntax = descriptor.value.trim();
|
|
8956
|
-
break;
|
|
8957
|
-
case "inherits":
|
|
8958
|
-
atProperty.inherits = descriptor.value.trim();
|
|
8959
|
-
break;
|
|
8960
|
-
}
|
|
8961
|
-
});
|
|
8962
|
-
if (typeof atProperty.inherits === "undefined" || typeof atProperty.syntax === "undefined") {
|
|
8963
|
-
return;
|
|
8964
|
-
}
|
|
8965
|
-
if (atProperty.syntax === "*" || atProperty.syntax === "'*'" || atProperty.syntax === '"*"') {
|
|
8966
|
-
names.forEach((name) => {
|
|
8967
|
-
customProperties[name] = {};
|
|
8968
|
-
});
|
|
8969
|
-
return;
|
|
8970
|
-
}
|
|
8971
|
-
if (typeof atProperty.initialValue === "undefined") {
|
|
8972
|
-
return;
|
|
8973
|
-
}
|
|
8974
|
-
names.forEach((name) => {
|
|
8975
|
-
customProperties[name] = {};
|
|
8976
|
-
});
|
|
8977
|
-
});
|
|
8978
8924
|
(await Promise.all(importPromises)).forEach((propertiesFromImport) => {
|
|
8979
8925
|
customProperties = Object.assign(customProperties, propertiesFromImport);
|
|
8980
8926
|
});
|
|
@@ -8982,7 +8928,7 @@ async function getCustomPropertiesFromRoot(root2, resolver) {
|
|
|
8982
8928
|
if (!decl.variable || !decl.prop.startsWith("--")) {
|
|
8983
8929
|
return;
|
|
8984
8930
|
}
|
|
8985
|
-
customProperties[decl.prop] =
|
|
8931
|
+
customProperties[decl.prop] = decl.value;
|
|
8986
8932
|
});
|
|
8987
8933
|
return customProperties;
|
|
8988
8934
|
}
|
|
@@ -9104,8 +9050,7 @@ const validateValueAST = (ast, { result: result2, customProperties, decl }) => {
|
|
|
9104
9050
|
return;
|
|
9105
9051
|
}
|
|
9106
9052
|
stylelint.utils.report({
|
|
9107
|
-
message: messages$1d.unexpected,
|
|
9108
|
-
messageArgs: [propertyName, decl.prop],
|
|
9053
|
+
message: messages$1d.unexpected(propertyName, decl.prop),
|
|
9109
9054
|
node: decl,
|
|
9110
9055
|
result: result2,
|
|
9111
9056
|
ruleName: ruleName$1d,
|
|
@@ -9115,8 +9060,8 @@ const validateValueAST = (ast, { result: result2, customProperties, decl }) => {
|
|
|
9115
9060
|
});
|
|
9116
9061
|
};
|
|
9117
9062
|
const isVarFunction = (node2) => node2.type === "function" && node2.value === "var" && node2.nodes[0].value.startsWith("--");
|
|
9118
|
-
const validateResult = (
|
|
9119
|
-
|
|
9063
|
+
const validateResult = (result2, customProperties) => {
|
|
9064
|
+
result2.root.walkDecls((decl) => {
|
|
9120
9065
|
if (hasCustomPropertyReference(decl)) {
|
|
9121
9066
|
validateDecl(decl, { result: result2, customProperties });
|
|
9122
9067
|
}
|
|
@@ -9143,7 +9088,7 @@ const ruleFunction = (method, opts) => {
|
|
|
9143
9088
|
await customPropertiesPromise,
|
|
9144
9089
|
await getCustomPropertiesFromRoot(root2, resolver)
|
|
9145
9090
|
);
|
|
9146
|
-
validateResult(
|
|
9091
|
+
validateResult(result2, customProperties);
|
|
9147
9092
|
}
|
|
9148
9093
|
};
|
|
9149
9094
|
};
|
|
@@ -19068,6 +19013,9 @@ function isIdentCodePoint(e3) {
|
|
|
19068
19013
|
function isNonASCII_IdentCodePoint(e3) {
|
|
19069
19014
|
return 183 === e3 || 8204 === e3 || 8205 === e3 || 8255 === e3 || 8256 === e3 || 8204 === e3 || (192 <= e3 && e3 <= 214 || 216 <= e3 && e3 <= 246 || 248 <= e3 && e3 <= 893 || 895 <= e3 && e3 <= 8191 || 8304 <= e3 && e3 <= 8591 || 11264 <= e3 && e3 <= 12271 || 12289 <= e3 && e3 <= 55295 || 63744 <= e3 && e3 <= 64975 || 65008 <= e3 && e3 <= 65533 || (0 === e3 || (!!isSurrogate(e3) || e3 >= 65536)));
|
|
19070
19015
|
}
|
|
19016
|
+
function isNonPrintableCodePoint(e3) {
|
|
19017
|
+
return 11 === e3 || 127 === e3 || 0 <= e3 && e3 <= 8 || 14 <= e3 && e3 <= 31;
|
|
19018
|
+
}
|
|
19071
19019
|
function isNewLine(e3) {
|
|
19072
19020
|
return e3 === r || e3 === t || 12 === e3;
|
|
19073
19021
|
}
|
|
@@ -19293,13 +19241,13 @@ function consumeUrlToken(n2, t2) {
|
|
|
19293
19241
|
}
|
|
19294
19242
|
return 41 === t2.source.codePointAt(t2.cursor) ? (t2.advanceCodePoint(), [c.URL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, { value: o2 }]) : (consumeBadURL(n2, t2), [c.BadURL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, void 0]);
|
|
19295
19243
|
}
|
|
19296
|
-
const
|
|
19297
|
-
if (34 ===
|
|
19244
|
+
const r2 = t2.source.codePointAt(t2.cursor);
|
|
19245
|
+
if (34 === r2 || 39 === r2 || 40 === r2 || isNonPrintableCodePoint(r2 ?? -1)) {
|
|
19298
19246
|
consumeBadURL(n2, t2);
|
|
19299
19247
|
const o3 = [c.BadURL, t2.source.slice(t2.representationStart, t2.representationEnd + 1), t2.representationStart, t2.representationEnd, void 0];
|
|
19300
19248
|
return n2.onParseError(new ParseErrorWithToken(e2.UnexpectedCharacterInURL, t2.representationStart, t2.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], o3)), o3;
|
|
19301
19249
|
}
|
|
19302
|
-
if (92 ===
|
|
19250
|
+
if (92 === r2) {
|
|
19303
19251
|
if (checkIfTwoCodePointsAreAValidEscape(t2)) {
|
|
19304
19252
|
t2.advanceCodePoint(), o2 += String.fromCodePoint(consumeEscapedCodePoint(n2, t2));
|
|
19305
19253
|
continue;
|
|
@@ -19310,7 +19258,6 @@ function consumeUrlToken(n2, t2) {
|
|
|
19310
19258
|
}
|
|
19311
19259
|
0 === t2.source.codePointAt(t2.cursor) || isSurrogate(t2.source.codePointAt(t2.cursor) ?? -1) ? (o2 += String.fromCodePoint(s), t2.advanceCodePoint()) : (o2 += t2.source[t2.cursor], t2.advanceCodePoint());
|
|
19312
19260
|
}
|
|
19313
|
-
var r2;
|
|
19314
19261
|
}
|
|
19315
19262
|
function consumeIdentLikeToken(e3, n2) {
|
|
19316
19263
|
const t2 = consumeIdentSequence(e3, n2);
|
|
@@ -19555,7 +19502,7 @@ class ContainerNodeBaseClass {
|
|
|
19555
19502
|
}
|
|
19556
19503
|
}
|
|
19557
19504
|
walk(e3, n2) {
|
|
19558
|
-
0 !== this.value.length && this.forEach((
|
|
19505
|
+
0 !== this.value.length && this.forEach((n3, t2) => false !== e3(n3, t2) && ((!("walk" in n3.node) || !this.value.includes(n3.node) || false !== n3.node.walk(e3, n3.state)) && void 0), n2);
|
|
19559
19506
|
}
|
|
19560
19507
|
}
|
|
19561
19508
|
class FunctionNode extends ContainerNodeBaseClass {
|
|
@@ -19572,14 +19519,14 @@ class FunctionNode extends ContainerNodeBaseClass {
|
|
|
19572
19519
|
isTokenEOF(this.endToken) && (this.endToken = [c.CloseParen, ")", -1, -1, void 0]);
|
|
19573
19520
|
}
|
|
19574
19521
|
tokens() {
|
|
19575
|
-
return isTokenEOF(this.endToken) ? [this.name, ...this.value.flatMap((
|
|
19522
|
+
return isTokenEOF(this.endToken) ? [this.name, ...this.value.flatMap((e3) => e3.tokens())] : [this.name, ...this.value.flatMap((e3) => e3.tokens()), this.endToken];
|
|
19576
19523
|
}
|
|
19577
19524
|
toString() {
|
|
19578
|
-
const e3 = this.value.map((
|
|
19525
|
+
const e3 = this.value.map((e4) => isToken(e4) ? stringify(e4) : e4.toString()).join("");
|
|
19579
19526
|
return stringify(this.name) + e3 + stringify(this.endToken);
|
|
19580
19527
|
}
|
|
19581
19528
|
toJSON() {
|
|
19582
|
-
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map((
|
|
19529
|
+
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map((e3) => e3.toJSON()) };
|
|
19583
19530
|
}
|
|
19584
19531
|
isFunctionNode() {
|
|
19585
19532
|
return FunctionNode.isFunctionNode(this);
|
|
@@ -19618,14 +19565,14 @@ class SimpleBlockNode extends ContainerNodeBaseClass {
|
|
|
19618
19565
|
}
|
|
19619
19566
|
}
|
|
19620
19567
|
tokens() {
|
|
19621
|
-
return isTokenEOF(this.endToken) ? [this.startToken, ...this.value.flatMap((
|
|
19568
|
+
return isTokenEOF(this.endToken) ? [this.startToken, ...this.value.flatMap((e3) => e3.tokens())] : [this.startToken, ...this.value.flatMap((e3) => e3.tokens()), this.endToken];
|
|
19622
19569
|
}
|
|
19623
19570
|
toString() {
|
|
19624
|
-
const e3 = this.value.map((
|
|
19571
|
+
const e3 = this.value.map((e4) => isToken(e4) ? stringify(e4) : e4.toString()).join("");
|
|
19625
19572
|
return stringify(this.startToken) + e3 + stringify(this.endToken);
|
|
19626
19573
|
}
|
|
19627
19574
|
toJSON() {
|
|
19628
|
-
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map((
|
|
19575
|
+
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map((e3) => e3.toJSON()) };
|
|
19629
19576
|
}
|
|
19630
19577
|
isSimpleBlockNode() {
|
|
19631
19578
|
return SimpleBlockNode.isSimpleBlockNode(this);
|
|
@@ -19710,10 +19657,12 @@ function consumeComment(e3, n2) {
|
|
|
19710
19657
|
function consumeAllCommentsAndWhitespace(e3, n2) {
|
|
19711
19658
|
const t2 = [];
|
|
19712
19659
|
let o2 = 0;
|
|
19713
|
-
for (; ; )
|
|
19714
|
-
|
|
19715
|
-
|
|
19716
|
-
|
|
19660
|
+
for (; ; ) {
|
|
19661
|
+
if (isTokenWhitespace(n2[o2])) {
|
|
19662
|
+
const e4 = consumeWhitespace(0, n2.slice(o2));
|
|
19663
|
+
o2 += e4.advance, t2.push(e4.node);
|
|
19664
|
+
continue;
|
|
19665
|
+
}
|
|
19717
19666
|
if (!isTokenComment(n2[o2])) return { advance: o2, nodes: t2 };
|
|
19718
19667
|
t2.push(new CommentNode(n2[o2])), o2++;
|
|
19719
19668
|
}
|
|
@@ -19954,10 +19903,10 @@ class MediaQueryInvalid {
|
|
|
19954
19903
|
return [new MediaQueryInvalid(this.media)];
|
|
19955
19904
|
}
|
|
19956
19905
|
tokens() {
|
|
19957
|
-
return this.media.flatMap((
|
|
19906
|
+
return this.media.flatMap((e3) => e3.tokens());
|
|
19958
19907
|
}
|
|
19959
19908
|
toString() {
|
|
19960
|
-
return this.media.map((
|
|
19909
|
+
return this.media.map((e3) => e3.toString()).join("");
|
|
19961
19910
|
}
|
|
19962
19911
|
walk(t2, i2) {
|
|
19963
19912
|
if (0 === this.media.length) return;
|
|
@@ -20062,10 +20011,10 @@ class MediaConditionListWithAnd {
|
|
|
20062
20011
|
this.leading = e3, this.list = t2, this.before = i2, this.after = a2;
|
|
20063
20012
|
}
|
|
20064
20013
|
tokens() {
|
|
20065
|
-
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((
|
|
20014
|
+
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((e3) => e3.tokens()), ...this.after];
|
|
20066
20015
|
}
|
|
20067
20016
|
toString() {
|
|
20068
|
-
return stringify(...this.before) + this.leading.toString() + this.list.map((
|
|
20017
|
+
return stringify(...this.before) + this.leading.toString() + this.list.map((e3) => e3.toString()).join("") + stringify(...this.after);
|
|
20069
20018
|
}
|
|
20070
20019
|
hasLeadingSpace() {
|
|
20071
20020
|
return this.before.length ? isTokenWhiteSpaceOrComment(this.before[0]) : this.leading.hasLeadingSpace();
|
|
@@ -20091,7 +20040,7 @@ class MediaConditionListWithAnd {
|
|
|
20091
20040
|
}
|
|
20092
20041
|
}
|
|
20093
20042
|
toJSON() {
|
|
20094
|
-
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((
|
|
20043
|
+
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((e3) => e3.toJSON()), before: this.before, after: this.after };
|
|
20095
20044
|
}
|
|
20096
20045
|
isMediaConditionListWithAnd() {
|
|
20097
20046
|
return MediaConditionListWithAnd.isMediaConditionListWithAnd(this);
|
|
@@ -20110,10 +20059,10 @@ class MediaConditionListWithOr {
|
|
|
20110
20059
|
this.leading = e3, this.list = t2, this.before = i2, this.after = a2;
|
|
20111
20060
|
}
|
|
20112
20061
|
tokens() {
|
|
20113
|
-
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((
|
|
20062
|
+
return [...this.before, ...this.leading.tokens(), ...this.list.flatMap((e3) => e3.tokens()), ...this.after];
|
|
20114
20063
|
}
|
|
20115
20064
|
toString() {
|
|
20116
|
-
return stringify(...this.before) + this.leading.toString() + this.list.map((
|
|
20065
|
+
return stringify(...this.before) + this.leading.toString() + this.list.map((e3) => e3.toString()).join("") + stringify(...this.after);
|
|
20117
20066
|
}
|
|
20118
20067
|
hasLeadingSpace() {
|
|
20119
20068
|
return this.before.length ? isTokenWhiteSpaceOrComment(this.before[0]) : this.leading.hasLeadingSpace();
|
|
@@ -20139,7 +20088,7 @@ class MediaConditionListWithOr {
|
|
|
20139
20088
|
}
|
|
20140
20089
|
}
|
|
20141
20090
|
toJSON() {
|
|
20142
|
-
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((
|
|
20091
|
+
return { type: this.type, leading: this.leading.toJSON(), list: this.list.map((e3) => e3.toJSON()), before: this.before, after: this.after };
|
|
20143
20092
|
}
|
|
20144
20093
|
isMediaConditionListWithOr() {
|
|
20145
20094
|
return MediaConditionListWithOr.isMediaConditionListWithOr(this);
|
|
@@ -20207,7 +20156,7 @@ function parseMediaFeatureName(e3) {
|
|
|
20207
20156
|
t2 = i2;
|
|
20208
20157
|
}
|
|
20209
20158
|
}
|
|
20210
|
-
return -1 !== t2 && new MediaFeatureName(e3[t2], e3.slice(0, t2).flatMap((
|
|
20159
|
+
return -1 !== t2 && new MediaFeatureName(e3[t2], e3.slice(0, t2).flatMap((e4) => e4.tokens()), e3.slice(t2 + 1).flatMap((e4) => e4.tokens()));
|
|
20211
20160
|
}
|
|
20212
20161
|
class MediaFeatureBoolean {
|
|
20213
20162
|
type = O.MediaFeatureBoolean;
|
|
@@ -20256,10 +20205,10 @@ class MediaFeatureValue {
|
|
|
20256
20205
|
Array.isArray(e3) && 1 === e3.length ? this.value = e3[0] : this.value = e3, this.before = t2, this.after = i2;
|
|
20257
20206
|
}
|
|
20258
20207
|
tokens() {
|
|
20259
|
-
return Array.isArray(this.value) ? [...this.before, ...this.value.flatMap((
|
|
20208
|
+
return Array.isArray(this.value) ? [...this.before, ...this.value.flatMap((e3) => e3.tokens()), ...this.after] : [...this.before, ...this.value.tokens(), ...this.after];
|
|
20260
20209
|
}
|
|
20261
20210
|
toString() {
|
|
20262
|
-
return Array.isArray(this.value) ? stringify(...this.before) + this.value.map((
|
|
20211
|
+
return Array.isArray(this.value) ? stringify(...this.before) + this.value.map((e3) => e3.toString()).join("") + stringify(...this.after) : stringify(...this.before) + this.value.toString() + stringify(...this.after);
|
|
20263
20212
|
}
|
|
20264
20213
|
indexOf(e3) {
|
|
20265
20214
|
return e3 === this.value ? "value" : -1;
|
|
@@ -20286,7 +20235,7 @@ class MediaFeatureValue {
|
|
|
20286
20235
|
}
|
|
20287
20236
|
}
|
|
20288
20237
|
toJSON() {
|
|
20289
|
-
return Array.isArray(this.value) ? { type: this.type, value: this.value.map((
|
|
20238
|
+
return Array.isArray(this.value) ? { type: this.type, value: this.value.map((e3) => e3.toJSON()), tokens: this.tokens() } : { type: this.type, value: this.value.toJSON(), tokens: this.tokens() };
|
|
20290
20239
|
}
|
|
20291
20240
|
isMediaFeatureValue() {
|
|
20292
20241
|
return MediaFeatureValue.isMediaFeatureValue(this);
|
|
@@ -20308,7 +20257,9 @@ function parseMediaFeatureValue(e3, t2 = false) {
|
|
|
20308
20257
|
continue;
|
|
20309
20258
|
}
|
|
20310
20259
|
i2 = r2, n2 = r2;
|
|
20311
|
-
|
|
20260
|
+
continue;
|
|
20261
|
+
}
|
|
20262
|
+
if (isEnvironmentVariable(s2)) i2 = r2, n2 = r2;
|
|
20312
20263
|
else if (isDimension(s2)) i2 = r2, n2 = r2;
|
|
20313
20264
|
else {
|
|
20314
20265
|
if (t2 || !isIdent(s2)) return false;
|
|
@@ -20316,7 +20267,7 @@ function parseMediaFeatureValue(e3, t2 = false) {
|
|
|
20316
20267
|
}
|
|
20317
20268
|
}
|
|
20318
20269
|
}
|
|
20319
|
-
return -1 !== i2 && new MediaFeatureValue(e3.slice(i2, n2 + 1), e3.slice(0, i2).flatMap((
|
|
20270
|
+
return -1 !== i2 && new MediaFeatureValue(e3.slice(i2, n2 + 1), e3.slice(0, i2).flatMap((e4) => e4.tokens()), e3.slice(n2 + 1).flatMap((e4) => e4.tokens()));
|
|
20320
20271
|
}
|
|
20321
20272
|
function matchesRatioExactly(e3) {
|
|
20322
20273
|
let t2 = -1, i2 = -1;
|
|
@@ -20807,9 +20758,9 @@ function parseMediaQuery(e3) {
|
|
|
20807
20758
|
}
|
|
20808
20759
|
}
|
|
20809
20760
|
let r2 = [], s2 = [];
|
|
20810
|
-
-1 !== i2 ? (r2 = e3.slice(0, i2 + 1).flatMap((
|
|
20761
|
+
-1 !== i2 ? (r2 = e3.slice(0, i2 + 1).flatMap((e4) => e4.tokens()), -1 !== a2 && (s2 = e3.slice(i2 + 1, a2 + 1).flatMap((e4) => e4.tokens()))) : -1 !== a2 && (s2 = e3.slice(0, a2 + 1).flatMap((e4) => e4.tokens()));
|
|
20811
20762
|
const d2 = parseMediaConditionWithoutOr(e3.slice(Math.max(i2, a2, n2) + 1));
|
|
20812
|
-
return false === d2 ? new MediaQueryWithType(r2, [...s2, ...e3.slice(a2 + 1).flatMap((
|
|
20763
|
+
return false === d2 ? new MediaQueryWithType(r2, [...s2, ...e3.slice(a2 + 1).flatMap((e4) => e4.tokens())]) : new MediaQueryWithType(r2, s2, e3.slice(a2 + 1, n2 + 1).flatMap((e4) => e4.tokens()), d2);
|
|
20813
20764
|
}
|
|
20814
20765
|
}
|
|
20815
20766
|
function parseMediaConditionListWithOr(e3) {
|
|
@@ -20832,7 +20783,7 @@ function parseMediaConditionListWithOr(e3) {
|
|
|
20832
20783
|
n2 = s2;
|
|
20833
20784
|
}
|
|
20834
20785
|
}
|
|
20835
|
-
return !(!t2 || !i2.length) && new MediaConditionListWithOr(t2, i2, e3.slice(0, n2).flatMap((
|
|
20786
|
+
return !(!t2 || !i2.length) && new MediaConditionListWithOr(t2, i2, e3.slice(0, n2).flatMap((e4) => e4.tokens()), e3.slice(r2 + 1).flatMap((e4) => e4.tokens()));
|
|
20836
20787
|
}
|
|
20837
20788
|
function parseMediaConditionListWithAnd(e3) {
|
|
20838
20789
|
let t2 = false;
|
|
@@ -20854,7 +20805,7 @@ function parseMediaConditionListWithAnd(e3) {
|
|
|
20854
20805
|
n2 = s2;
|
|
20855
20806
|
}
|
|
20856
20807
|
}
|
|
20857
|
-
return !(!t2 || !i2.length) && new MediaConditionListWithAnd(t2, i2, e3.slice(0, n2).flatMap((
|
|
20808
|
+
return !(!t2 || !i2.length) && new MediaConditionListWithAnd(t2, i2, e3.slice(0, n2).flatMap((e4) => e4.tokens()), e3.slice(r2 + 1).flatMap((e4) => e4.tokens()));
|
|
20858
20809
|
}
|
|
20859
20810
|
function parseMediaCondition(e3) {
|
|
20860
20811
|
const t2 = parseMediaNot(e3);
|
|
@@ -20888,10 +20839,10 @@ function parseMediaInParens(e3) {
|
|
|
20888
20839
|
const i2 = e3[t2];
|
|
20889
20840
|
if (!isTokenOpenParen(i2.startToken)) return false;
|
|
20890
20841
|
i2.normalize();
|
|
20891
|
-
const n2 = [...e3.slice(0, t2).flatMap((
|
|
20842
|
+
const n2 = [...e3.slice(0, t2).flatMap((e4) => e4.tokens()), i2.startToken], r2 = [i2.endToken, ...e3.slice(t2 + 1).flatMap((e4) => e4.tokens())], s2 = parseMediaFeature(i2, n2, r2);
|
|
20892
20843
|
if (false !== s2) return new MediaInParens(s2);
|
|
20893
20844
|
const o2 = parseMediaCondition(i2.value);
|
|
20894
|
-
return false !== o2 ? new MediaInParens(o2, n2, r2) : new MediaInParens(new GeneralEnclosed(i2), e3.slice(0, t2).flatMap((
|
|
20845
|
+
return false !== o2 ? new MediaInParens(o2, n2, r2) : new MediaInParens(new GeneralEnclosed(i2), e3.slice(0, t2).flatMap((e4) => e4.tokens()), e3.slice(t2 + 1).flatMap((e4) => e4.tokens()));
|
|
20895
20846
|
}
|
|
20896
20847
|
function parseMediaInParensFromSimpleBlock(e3) {
|
|
20897
20848
|
if (!isTokenOpenParen(e3.startToken)) return false;
|
|
@@ -20918,13 +20869,14 @@ function parseMediaNot(e3) {
|
|
|
20918
20869
|
}
|
|
20919
20870
|
return false;
|
|
20920
20871
|
}
|
|
20921
|
-
if (
|
|
20922
|
-
{
|
|
20872
|
+
if (t2 && isSimpleBlockNode(r2)) {
|
|
20923
20873
|
r2.normalize();
|
|
20924
20874
|
const t3 = parseMediaInParensFromSimpleBlock(r2);
|
|
20925
20875
|
if (false === t3) return false;
|
|
20926
|
-
i2 = new MediaNot(e3.slice(0, n2).flatMap((
|
|
20876
|
+
i2 = new MediaNot(e3.slice(0, n2).flatMap((e4) => e4.tokens()), t3);
|
|
20877
|
+
continue;
|
|
20927
20878
|
}
|
|
20879
|
+
return false;
|
|
20928
20880
|
}
|
|
20929
20881
|
}
|
|
20930
20882
|
return i2 || false;
|
|
@@ -20947,7 +20899,7 @@ function parseMediaOr(e3) {
|
|
|
20947
20899
|
if (t2 && isSimpleBlockNode(n2)) {
|
|
20948
20900
|
n2.normalize();
|
|
20949
20901
|
const t3 = parseMediaInParensFromSimpleBlock(n2);
|
|
20950
|
-
return false !== t3 && { advance: i2, node: new MediaOr(e3.slice(0, i2).flatMap((
|
|
20902
|
+
return false !== t3 && { advance: i2, node: new MediaOr(e3.slice(0, i2).flatMap((e4) => e4.tokens()), t3) };
|
|
20951
20903
|
}
|
|
20952
20904
|
return false;
|
|
20953
20905
|
}
|
|
@@ -20972,7 +20924,7 @@ function parseMediaAnd(e3) {
|
|
|
20972
20924
|
if (t2 && isSimpleBlockNode(n2)) {
|
|
20973
20925
|
n2.normalize();
|
|
20974
20926
|
const t3 = parseMediaInParensFromSimpleBlock(n2);
|
|
20975
|
-
return false !== t3 && { advance: i2, node: new MediaAnd(e3.slice(0, i2).flatMap((
|
|
20927
|
+
return false !== t3 && { advance: i2, node: new MediaAnd(e3.slice(0, i2).flatMap((e4) => e4.tokens()), t3) };
|
|
20976
20928
|
}
|
|
20977
20929
|
return false;
|
|
20978
20930
|
}
|
|
@@ -20981,10 +20933,10 @@ function parseMediaAnd(e3) {
|
|
|
20981
20933
|
}
|
|
20982
20934
|
function parseFromTokens(e3, t2) {
|
|
20983
20935
|
const i2 = parseCommaSeparatedListOfComponentValues(e3, { onParseError: t2?.onParseError });
|
|
20984
|
-
return i2.map((
|
|
20936
|
+
return i2.map((e4, a2) => {
|
|
20985
20937
|
const n2 = parseMediaQuery(e4);
|
|
20986
20938
|
return false === n2 && true === t2?.preserveInvalidMediaQueries ? new MediaQueryInvalid(i2[a2]) : n2;
|
|
20987
|
-
})
|
|
20939
|
+
}).filter((e4) => !!e4);
|
|
20988
20940
|
}
|
|
20989
20941
|
function isGeneralEnclosed(e3) {
|
|
20990
20942
|
return GeneralEnclosed.isGeneralEnclosed(e3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stylelint-config-silverwind",
|
|
3
|
-
"version": "35.0.
|
|
3
|
+
"version": "35.0.2",
|
|
4
4
|
"description": "Extensive stylelint configuration",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"repository": "silverwind/stylelint-config-silverwind",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@silverwind/postcss-html": "1.8.3",
|
|
21
|
-
"@stylelint-types/stylelint-stylistic": "
|
|
22
|
-
"@stylistic/stylelint-plugin": "
|
|
21
|
+
"@stylelint-types/stylelint-stylistic": "5.0.0",
|
|
22
|
+
"@stylistic/stylelint-plugin": "5.0.0",
|
|
23
23
|
"eslint": "9.39.2",
|
|
24
|
-
"eslint-config-silverwind": "117.0.
|
|
24
|
+
"eslint-config-silverwind": "117.0.3",
|
|
25
25
|
"stylelint": "17.0.0",
|
|
26
26
|
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
|
|
27
27
|
"stylelint-declaration-strict-value": "1.10.11",
|
|
28
|
-
"stylelint-value-no-unknown-custom-properties": "6.1
|
|
28
|
+
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
30
|
"typescript-config-silverwind": "14.0.0",
|
|
31
31
|
"updates": "17.0.7",
|