@hyperframes/lint 0.8.172 → 0.8.174
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 +7 -4
- package/dist/index.js +9 -5
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -1530,7 +1530,10 @@ function cssErrorOffset(source, error) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
1532
|
// src/rules/media.ts
|
|
1533
|
-
import {
|
|
1533
|
+
import {
|
|
1534
|
+
COLOR_GRADING_SOURCE_TAGS,
|
|
1535
|
+
validateColorGradingContract
|
|
1536
|
+
} from "@hyperframes/parsers/color-grading-contract";
|
|
1534
1537
|
import { extractMediaSrcMutations } from "@hyperframes/parsers/composition";
|
|
1535
1538
|
import { parseHTML } from "linkedom";
|
|
1536
1539
|
|
|
@@ -2018,11 +2021,11 @@ var mediaRules = [
|
|
|
2018
2021
|
snippet: truncateSnippet(tag.raw)
|
|
2019
2022
|
});
|
|
2020
2023
|
};
|
|
2021
|
-
if (
|
|
2024
|
+
if (!COLOR_GRADING_SOURCE_TAGS.includes(tag.name)) {
|
|
2022
2025
|
report(
|
|
2023
2026
|
"color_grading_non_media",
|
|
2024
|
-
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video> and <
|
|
2025
|
-
"Move the grading attribute to the real <video> or <
|
|
2027
|
+
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video>, <img> and <canvas> elements.`,
|
|
2028
|
+
"Move the grading attribute to the real <video>, <img> or <canvas> element. Do not attach it to a wrapper or CSS background."
|
|
2026
2029
|
);
|
|
2027
2030
|
continue;
|
|
2028
2031
|
}
|
package/dist/index.js
CHANGED
|
@@ -1536,7 +1536,10 @@ function cssErrorOffset(source, error) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
|
|
1538
1538
|
// src/rules/media.ts
|
|
1539
|
-
import {
|
|
1539
|
+
import {
|
|
1540
|
+
COLOR_GRADING_SOURCE_TAGS,
|
|
1541
|
+
validateColorGradingContract
|
|
1542
|
+
} from "@hyperframes/parsers/color-grading-contract";
|
|
1540
1543
|
import { extractMediaSrcMutations } from "@hyperframes/parsers/composition";
|
|
1541
1544
|
import { parseHTML } from "linkedom";
|
|
1542
1545
|
|
|
@@ -2024,11 +2027,11 @@ var mediaRules = [
|
|
|
2024
2027
|
snippet: truncateSnippet(tag.raw)
|
|
2025
2028
|
});
|
|
2026
2029
|
};
|
|
2027
|
-
if (
|
|
2030
|
+
if (!COLOR_GRADING_SOURCE_TAGS.includes(tag.name)) {
|
|
2028
2031
|
report(
|
|
2029
2032
|
"color_grading_non_media",
|
|
2030
|
-
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video> and <
|
|
2031
|
-
"Move the grading attribute to the real <video> or <
|
|
2033
|
+
`data-color-grading on <${tag.name}> has no effect. The shader runtime only grades real <video>, <img> and <canvas> elements.`,
|
|
2034
|
+
"Move the grading attribute to the real <video>, <img> or <canvas> element. Do not attach it to a wrapper or CSS background."
|
|
2032
2035
|
);
|
|
2033
2036
|
continue;
|
|
2034
2037
|
}
|
|
@@ -6648,6 +6651,7 @@ import { createHash } from "crypto";
|
|
|
6648
6651
|
import { existsSync as existsSync2, readFileSync, readdirSync } from "fs";
|
|
6649
6652
|
import { dirname as dirname2, extname, join as join3, relative as relative2, resolve } from "path";
|
|
6650
6653
|
import { rewriteAssetPath as rewriteAssetPath2 } from "@hyperframes/parsers/asset-paths";
|
|
6654
|
+
import { spansOverlap } from "@hyperframes/parsers/time-spans";
|
|
6651
6655
|
import { checkSubCompositionUsability } from "@hyperframes/parsers/sub-composition-validity";
|
|
6652
6656
|
import { parseHTML as parseHTML3 } from "linkedom";
|
|
6653
6657
|
import {
|
|
@@ -7346,7 +7350,7 @@ function lintDuplicateAudioTracks(htmlSources) {
|
|
|
7346
7350
|
const a = tracks[i];
|
|
7347
7351
|
const b = tracks[j];
|
|
7348
7352
|
if (a.trackIndex !== b.trackIndex) continue;
|
|
7349
|
-
if (a.start
|
|
7353
|
+
if (spansOverlap(a.start, a.end, b.start, b.end)) {
|
|
7350
7354
|
findings.push({
|
|
7351
7355
|
code: "duplicate_audio_track",
|
|
7352
7356
|
severity: "warning",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/lint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.174",
|
|
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.8.
|
|
38
|
+
"@hyperframes/parsers": "0.8.174"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.0.10",
|