@hyperframes/lint 0.8.230 → 0.9.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/browser.js +9 -2
- package/dist/index.js +9 -2
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -6179,9 +6179,14 @@ var captionRules = [
|
|
|
6179
6179
|
];
|
|
6180
6180
|
|
|
6181
6181
|
// src/rules/adapters.ts
|
|
6182
|
+
function inheritsLibrariesFromHost({ options, rawSource }) {
|
|
6183
|
+
return options.isSubComposition === true || rawSource.trimStart().toLowerCase().startsWith("<template");
|
|
6184
|
+
}
|
|
6182
6185
|
var adapterRules = [
|
|
6183
6186
|
// missing_lottie_script
|
|
6184
|
-
(
|
|
6187
|
+
(ctx) => {
|
|
6188
|
+
const { tags, scripts } = ctx;
|
|
6189
|
+
if (inheritsLibrariesFromHost(ctx)) return [];
|
|
6185
6190
|
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
6186
6191
|
const hasLottieAttr = tags.some((t) => readAttr(t.raw, "data-lottie-src") !== null);
|
|
6187
6192
|
const usesLottieApi = texts.some(
|
|
@@ -6199,7 +6204,9 @@ var adapterRules = [
|
|
|
6199
6204
|
];
|
|
6200
6205
|
},
|
|
6201
6206
|
// missing_three_script
|
|
6202
|
-
(
|
|
6207
|
+
(ctx) => {
|
|
6208
|
+
const { scripts } = ctx;
|
|
6209
|
+
if (inheritsLibrariesFromHost(ctx)) return [];
|
|
6203
6210
|
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
6204
6211
|
const usesThree = texts.some((t) => /\bTHREE\./.test(t));
|
|
6205
6212
|
const hasThreeScript = srcs.some((src) => /three/i.test(src));
|
package/dist/index.js
CHANGED
|
@@ -6185,9 +6185,14 @@ var captionRules = [
|
|
|
6185
6185
|
];
|
|
6186
6186
|
|
|
6187
6187
|
// src/rules/adapters.ts
|
|
6188
|
+
function inheritsLibrariesFromHost({ options, rawSource }) {
|
|
6189
|
+
return options.isSubComposition === true || rawSource.trimStart().toLowerCase().startsWith("<template");
|
|
6190
|
+
}
|
|
6188
6191
|
var adapterRules = [
|
|
6189
6192
|
// missing_lottie_script
|
|
6190
|
-
(
|
|
6193
|
+
(ctx) => {
|
|
6194
|
+
const { tags, scripts } = ctx;
|
|
6195
|
+
if (inheritsLibrariesFromHost(ctx)) return [];
|
|
6191
6196
|
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
6192
6197
|
const hasLottieAttr = tags.some((t) => readAttr(t.raw, "data-lottie-src") !== null);
|
|
6193
6198
|
const usesLottieApi = texts.some(
|
|
@@ -6205,7 +6210,9 @@ var adapterRules = [
|
|
|
6205
6210
|
];
|
|
6206
6211
|
},
|
|
6207
6212
|
// missing_three_script
|
|
6208
|
-
(
|
|
6213
|
+
(ctx) => {
|
|
6214
|
+
const { scripts } = ctx;
|
|
6215
|
+
if (inheritsLibrariesFromHost(ctx)) return [];
|
|
6209
6216
|
const { texts, srcs } = extractScriptTextsAndSrcs(scripts);
|
|
6210
6217
|
const usesThree = texts.some((t) => /\bTHREE\./.test(t));
|
|
6211
6218
|
const hasThreeScript = srcs.some((src) => /three/i.test(src));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/lint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"linkedom": "^0.18.12",
|
|
36
36
|
"postcss": "^8.5.8",
|
|
37
37
|
"postcss-selector-parser": "^7.1.4",
|
|
38
|
-
"@hyperframes/parsers": "0.
|
|
38
|
+
"@hyperframes/parsers": "0.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.0.10",
|