wrec 0.40.1 → 0.40.3
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 +1 -1
- package/scripts/declare.js +1 -0
- package/scripts/lint.js +8 -2
package/package.json
CHANGED
package/scripts/declare.js
CHANGED
|
@@ -49,6 +49,7 @@ function analyzeSourceFile(sourceFile) {
|
|
|
49
49
|
if (!declareType) continue;
|
|
50
50
|
declareLines.push(createDeclareLine(propName, declareType));
|
|
51
51
|
}
|
|
52
|
+
declareLines.sort((a, b) => a.localeCompare(b));
|
|
52
53
|
|
|
53
54
|
const start = propertiesMember.end;
|
|
54
55
|
const end = findDeclareBlockEnd(classNode, propertiesMember, sourceFile);
|
package/scripts/lint.js
CHANGED
|
@@ -801,14 +801,20 @@ function extractTemplateExpressions(
|
|
|
801
801
|
while (true) {
|
|
802
802
|
const match = CSS_PROPERTY_RE.exec(rendered);
|
|
803
803
|
if (!match) break;
|
|
804
|
-
const
|
|
804
|
+
const rawValue = match[2] ?? '';
|
|
805
|
+
const value = rawValue.trim();
|
|
805
806
|
if (value && REFS_TEST_RE.test(value)) {
|
|
807
|
+
const valueOffsetInMatch = match[0].lastIndexOf(rawValue);
|
|
808
|
+
const leadingWhitespace = rawValue.length - rawValue.trimStart().length;
|
|
809
|
+
const valueLocation = resolveLocation(
|
|
810
|
+
match.index + valueOffsetInMatch + leadingWhitespace
|
|
811
|
+
);
|
|
806
812
|
expressions.push({
|
|
807
813
|
context: 'instance',
|
|
808
814
|
eventHandler: false,
|
|
809
815
|
kind: 'css',
|
|
810
816
|
text: value,
|
|
811
|
-
location:
|
|
817
|
+
location: valueLocation
|
|
812
818
|
});
|
|
813
819
|
}
|
|
814
820
|
}
|