@multiplatform.one/config 9.0.2 → 9.0.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/design-lint.mjs +16 -13
- package/package.json +2 -2
package/design-lint.mjs
CHANGED
|
@@ -613,9 +613,8 @@ function inspectCatalog(source, filename, options) {
|
|
|
613
613
|
const at = source.indexOf(JSON.stringify(value), cursor);
|
|
614
614
|
if (at !== -1) cursor = at;
|
|
615
615
|
const error = keys.some((key) => errorKey.test(key));
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
: (catalogKind(keys) ?? (error ? "text" : undefined));
|
|
616
|
+
const fallback = error ? "text" : undefined;
|
|
617
|
+
const kind = translation(filename) ? "translation" : (catalogKind(keys) ?? fallback);
|
|
619
618
|
options.onCopy?.({ filename, line: lineOf(source, cursor), text: value, kind });
|
|
620
619
|
for (const [rule, message] of copyFindings(value, { ...options, error, kind }))
|
|
621
620
|
errors.push(`${filename}:${lineOf(source, cursor)}:1: [${rule}] ${message}`);
|
|
@@ -1103,17 +1102,21 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1103
1102
|
}
|
|
1104
1103
|
function copyKind(node) {
|
|
1105
1104
|
if (ts.isJsxText(node)) return elementKind(node.parent);
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
if (!
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1105
|
+
let child = node;
|
|
1106
|
+
let parent = node.parent;
|
|
1107
|
+
while (parent) {
|
|
1108
|
+
let next = parent;
|
|
1109
|
+
if (!passesCopy(parent, child)) {
|
|
1110
|
+
if (ts.isJsxExpression(parent)) return elementKind(parent.parent);
|
|
1111
|
+
if (ts.isJsxAttribute(parent))
|
|
1112
|
+
return attributeKind(name(parent.name), parent.parent.parent);
|
|
1113
|
+
if (!ts.isPropertyAssignment(parent) || parent.initializer !== child) return undefined;
|
|
1114
|
+
const host = parent.parent.parent;
|
|
1115
|
+
if (name(parent.name) !== "defaultValue" || !tCall(host)) return propertyKind(parent, host);
|
|
1116
|
+
next = host;
|
|
1115
1117
|
}
|
|
1116
|
-
|
|
1118
|
+
child = next;
|
|
1119
|
+
parent = next.parent;
|
|
1117
1120
|
}
|
|
1118
1121
|
return undefined;
|
|
1119
1122
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@babel/parser": "^7.29.9",
|
|
123
123
|
"@babel/plugin-transform-block-scoping": "^7.29.7",
|
|
124
124
|
"@babel/traverse": "^7.29.10",
|
|
125
|
-
"@multiplatform.one/utils": "^9.0.
|
|
125
|
+
"@multiplatform.one/utils": "^9.0.3",
|
|
126
126
|
"@tamagui/vite-plugin": "2.7.6",
|
|
127
127
|
"@vitejs/plugin-react": "^6.1.2",
|
|
128
128
|
"dotenv": "^17.4.2",
|