@remotion/eslint-plugin 4.0.316 → 4.0.318
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/cjs/index.js +112 -17
- package/dist/esm/index.mjs +123 -24
- package/dist/index.d.ts +4 -0
- package/dist/rules/slow-css-property.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -386,9 +386,96 @@ var no_string_assets_default = createRule6({
|
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
// src/rules/
|
|
389
|
+
// src/rules/slow-css-property.ts
|
|
390
390
|
var import_utils7 = require("@typescript-eslint/utils");
|
|
391
391
|
var createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
|
|
392
|
+
return "https://remotion.dev/docs/gpu";
|
|
393
|
+
});
|
|
394
|
+
var SlowCssProperty = [
|
|
395
|
+
"This GPU effect may slow down the render on machines which don't have a GPU.",
|
|
396
|
+
"See: https://remotion.dev/docs/gpu"
|
|
397
|
+
].join(`
|
|
398
|
+
`);
|
|
399
|
+
var slowCssProperties = new Set(["boxShadow", "textShadow", "filter"]);
|
|
400
|
+
var slowCssPropertiesKebab = new Set(["box-shadow", "text-shadow", "filter"]);
|
|
401
|
+
var slowTailwindClasses = [
|
|
402
|
+
/\bshadow-(?:sm|md|lg|xl|2xl|inner|none|\w+)\b/,
|
|
403
|
+
/\bshadow-\w+(?:\/\d+)?\b/,
|
|
404
|
+
/\bblur-(?:none|sm|md|lg|xl|2xl|3xl|\w+)\b/,
|
|
405
|
+
/\bbrightness-\d+\b/,
|
|
406
|
+
/\bcontrast-\d+\b/,
|
|
407
|
+
/\bdrop-shadow-(?:sm|md|lg|xl|2xl|none|\w+)\b/,
|
|
408
|
+
/\bgrayscale(?:-\d+)?\b/,
|
|
409
|
+
/\bhue-rotate-\d+\b/,
|
|
410
|
+
/\binvert(?:-\d+)?\b/,
|
|
411
|
+
/\bsaturate-\d+\b/,
|
|
412
|
+
/\bsepia(?:-\d+)?\b/,
|
|
413
|
+
/\btext-shadow-\w+\b/
|
|
414
|
+
];
|
|
415
|
+
function containsSlowTailwindClass(classString) {
|
|
416
|
+
return slowTailwindClasses.some((pattern) => pattern.test(classString));
|
|
417
|
+
}
|
|
418
|
+
var slow_css_property_default = createRule7({
|
|
419
|
+
name: "slow-css-property",
|
|
420
|
+
meta: {
|
|
421
|
+
type: "problem",
|
|
422
|
+
docs: {
|
|
423
|
+
description: SlowCssProperty,
|
|
424
|
+
recommended: "warn"
|
|
425
|
+
},
|
|
426
|
+
fixable: undefined,
|
|
427
|
+
schema: [],
|
|
428
|
+
messages: {
|
|
429
|
+
SlowCssProperty
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
defaultOptions: [],
|
|
433
|
+
create: (context) => {
|
|
434
|
+
return {
|
|
435
|
+
Property: (node) => {
|
|
436
|
+
let propertyName;
|
|
437
|
+
if (node.key.type === "Identifier") {
|
|
438
|
+
propertyName = node.key.name;
|
|
439
|
+
} else if (node.key.type === "Literal" && typeof node.key.value === "string") {
|
|
440
|
+
propertyName = node.key.value;
|
|
441
|
+
}
|
|
442
|
+
if (!propertyName) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
const isSlowProperty = slowCssProperties.has(propertyName) || slowCssPropertiesKebab.has(propertyName);
|
|
446
|
+
if (isSlowProperty) {
|
|
447
|
+
context.report({
|
|
448
|
+
messageId: "SlowCssProperty",
|
|
449
|
+
node
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
JSXAttribute: (node) => {
|
|
454
|
+
if (node.name.type === "JSXIdentifier" && node.name.name === "className" && node.value) {
|
|
455
|
+
let classString;
|
|
456
|
+
if (node.value.type === "Literal" && typeof node.value.value === "string") {
|
|
457
|
+
classString = node.value.value;
|
|
458
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "Literal" && typeof node.value.expression.value === "string") {
|
|
459
|
+
classString = node.value.expression.value;
|
|
460
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "TemplateLiteral") {
|
|
461
|
+
const templateLiteral = node.value.expression;
|
|
462
|
+
classString = templateLiteral.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
|
|
463
|
+
}
|
|
464
|
+
if (classString && containsSlowTailwindClass(classString)) {
|
|
465
|
+
context.report({
|
|
466
|
+
messageId: "SlowCssProperty",
|
|
467
|
+
node
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
// src/rules/staticfile-no-relative.ts
|
|
477
|
+
var import_utils8 = require("@typescript-eslint/utils");
|
|
478
|
+
var createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
|
|
392
479
|
return `https://remotion.dev/docs/staticfile-relative-paths`;
|
|
393
480
|
});
|
|
394
481
|
var RelativePathStaticFile = [
|
|
@@ -404,7 +491,7 @@ var PublicStaticFile = [
|
|
|
404
491
|
"Do not prefix your assets with public/.",
|
|
405
492
|
"See: https://remotion.dev/docs/staticfile-relative-paths"
|
|
406
493
|
].join("");
|
|
407
|
-
var staticfile_no_relative_default =
|
|
494
|
+
var staticfile_no_relative_default = createRule8({
|
|
408
495
|
name: "staticfile-no-relative",
|
|
409
496
|
meta: {
|
|
410
497
|
type: "problem",
|
|
@@ -471,8 +558,8 @@ var staticfile_no_relative_default = createRule7({
|
|
|
471
558
|
});
|
|
472
559
|
|
|
473
560
|
// src/rules/staticfile-no-remote.ts
|
|
474
|
-
var
|
|
475
|
-
var
|
|
561
|
+
var import_utils9 = require("@typescript-eslint/utils");
|
|
562
|
+
var createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
|
|
476
563
|
return `https://remotion.dev/docs/staticfile-remote-urls`;
|
|
477
564
|
});
|
|
478
565
|
var RelativePathStaticFile2 = [
|
|
@@ -480,7 +567,7 @@ var RelativePathStaticFile2 = [
|
|
|
480
567
|
"See: https://remotion.dev/docs/staticfile-remote-urls"
|
|
481
568
|
].join(`
|
|
482
569
|
`);
|
|
483
|
-
var staticfile_no_remote_default =
|
|
570
|
+
var staticfile_no_remote_default = createRule9({
|
|
484
571
|
name: "staticfile-no-remote",
|
|
485
572
|
meta: {
|
|
486
573
|
type: "problem",
|
|
@@ -533,8 +620,8 @@ var staticfile_no_remote_default = createRule8({
|
|
|
533
620
|
});
|
|
534
621
|
|
|
535
622
|
// src/rules/use-gif-component.ts
|
|
536
|
-
var
|
|
537
|
-
var
|
|
623
|
+
var import_utils10 = require("@typescript-eslint/utils");
|
|
624
|
+
var createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
|
|
538
625
|
return `https://github.com/remotion-dev/remotion`;
|
|
539
626
|
});
|
|
540
627
|
var UseGifComponent = [
|
|
@@ -543,7 +630,7 @@ var UseGifComponent = [
|
|
|
543
630
|
"Ignore this message if this is a non-animated GIF."
|
|
544
631
|
].join(`
|
|
545
632
|
`);
|
|
546
|
-
var use_gif_component_default =
|
|
633
|
+
var use_gif_component_default = createRule10({
|
|
547
634
|
name: "use-gif-component",
|
|
548
635
|
meta: {
|
|
549
636
|
type: "problem",
|
|
@@ -619,12 +706,12 @@ var use_gif_component_default = createRule9({
|
|
|
619
706
|
});
|
|
620
707
|
|
|
621
708
|
// src/rules/v4-import.ts
|
|
622
|
-
var
|
|
623
|
-
var
|
|
709
|
+
var import_utils11 = require("@typescript-eslint/utils");
|
|
710
|
+
var createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
|
|
624
711
|
return `https://www.remotion.dev/docs/4-0-migration`;
|
|
625
712
|
});
|
|
626
713
|
var ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
|
|
627
|
-
var rule =
|
|
714
|
+
var rule = createRule11({
|
|
628
715
|
name: "v4-config-import",
|
|
629
716
|
meta: {
|
|
630
717
|
type: "problem",
|
|
@@ -659,12 +746,12 @@ var rule = createRule10({
|
|
|
659
746
|
var v4_import_default = rule;
|
|
660
747
|
|
|
661
748
|
// src/rules/volume-callback.ts
|
|
662
|
-
var
|
|
663
|
-
var
|
|
749
|
+
var import_utils12 = require("@typescript-eslint/utils");
|
|
750
|
+
var createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
|
|
664
751
|
return `https://github.com/remotion-dev/remotion`;
|
|
665
752
|
});
|
|
666
753
|
var VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume";
|
|
667
|
-
var volume_callback_default =
|
|
754
|
+
var volume_callback_default = createRule12({
|
|
668
755
|
name: "volume-callback",
|
|
669
756
|
meta: {
|
|
670
757
|
type: "problem",
|
|
@@ -716,6 +803,12 @@ var volume_callback_default = createRule11({
|
|
|
716
803
|
if (expression.type === "ArrowFunctionExpression") {
|
|
717
804
|
return;
|
|
718
805
|
}
|
|
806
|
+
if (expression.type === "FunctionExpression") {
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
if (expression.type === "Identifier") {
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
719
812
|
context.report({
|
|
720
813
|
messageId: "VolumeCallback",
|
|
721
814
|
node
|
|
@@ -726,15 +819,15 @@ var volume_callback_default = createRule11({
|
|
|
726
819
|
});
|
|
727
820
|
|
|
728
821
|
// src/rules/warn-native-media-tag.ts
|
|
729
|
-
var
|
|
730
|
-
var
|
|
822
|
+
var import_utils13 = require("@typescript-eslint/utils");
|
|
823
|
+
var createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
|
|
731
824
|
return `https://github.com/remotion-dev/remotion`;
|
|
732
825
|
});
|
|
733
826
|
var NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.";
|
|
734
827
|
var NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.";
|
|
735
828
|
var NoNativeAudioTag = "Use the <Audio /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
|
|
736
829
|
var NoNativeVideoTag = "Use the <OffthreadVideo /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
|
|
737
|
-
var warn_native_media_tag_default =
|
|
830
|
+
var warn_native_media_tag_default = createRule13({
|
|
738
831
|
name: "warn-native-media-tag",
|
|
739
832
|
meta: {
|
|
740
833
|
type: "problem",
|
|
@@ -835,6 +928,7 @@ var rules = {
|
|
|
835
928
|
"staticfile-no-relative": staticfile_no_relative_default,
|
|
836
929
|
"staticfile-no-remote": staticfile_no_remote_default,
|
|
837
930
|
"no-background-image": no_background_image_default,
|
|
931
|
+
"slow-css-property": slow_css_property_default,
|
|
838
932
|
"v4-config-import": v4_import_default
|
|
839
933
|
};
|
|
840
934
|
var recommendedRuleConfig = {
|
|
@@ -849,6 +943,7 @@ var recommendedRuleConfig = {
|
|
|
849
943
|
"@remotion/staticfile-no-relative": "error",
|
|
850
944
|
"@remotion/staticfile-no-remote": "error",
|
|
851
945
|
"@remotion/no-background-image": "error",
|
|
946
|
+
"@remotion/slow-css-property": "warn",
|
|
852
947
|
"@remotion/v4-config-import": "error"
|
|
853
948
|
};
|
|
854
949
|
var configs = {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -404,11 +404,101 @@ var init_no_string_assets = __esm(() => {
|
|
|
404
404
|
});
|
|
405
405
|
});
|
|
406
406
|
|
|
407
|
-
// src/rules/
|
|
407
|
+
// src/rules/slow-css-property.ts
|
|
408
408
|
import { ESLintUtils as ESLintUtils7 } from "@typescript-eslint/utils";
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
function containsSlowTailwindClass(classString) {
|
|
410
|
+
return slowTailwindClasses.some((pattern) => pattern.test(classString));
|
|
411
|
+
}
|
|
412
|
+
var createRule7, SlowCssProperty, slowCssProperties, slowCssPropertiesKebab, slowTailwindClasses, slow_css_property_default;
|
|
413
|
+
var init_slow_css_property = __esm(() => {
|
|
411
414
|
createRule7 = ESLintUtils7.RuleCreator(() => {
|
|
415
|
+
return "https://remotion.dev/docs/gpu";
|
|
416
|
+
});
|
|
417
|
+
SlowCssProperty = [
|
|
418
|
+
"This GPU effect may slow down the render on machines which don't have a GPU.",
|
|
419
|
+
"See: https://remotion.dev/docs/gpu"
|
|
420
|
+
].join(`
|
|
421
|
+
`);
|
|
422
|
+
slowCssProperties = new Set(["boxShadow", "textShadow", "filter"]);
|
|
423
|
+
slowCssPropertiesKebab = new Set(["box-shadow", "text-shadow", "filter"]);
|
|
424
|
+
slowTailwindClasses = [
|
|
425
|
+
/\bshadow-(?:sm|md|lg|xl|2xl|inner|none|\w+)\b/,
|
|
426
|
+
/\bshadow-\w+(?:\/\d+)?\b/,
|
|
427
|
+
/\bblur-(?:none|sm|md|lg|xl|2xl|3xl|\w+)\b/,
|
|
428
|
+
/\bbrightness-\d+\b/,
|
|
429
|
+
/\bcontrast-\d+\b/,
|
|
430
|
+
/\bdrop-shadow-(?:sm|md|lg|xl|2xl|none|\w+)\b/,
|
|
431
|
+
/\bgrayscale(?:-\d+)?\b/,
|
|
432
|
+
/\bhue-rotate-\d+\b/,
|
|
433
|
+
/\binvert(?:-\d+)?\b/,
|
|
434
|
+
/\bsaturate-\d+\b/,
|
|
435
|
+
/\bsepia(?:-\d+)?\b/,
|
|
436
|
+
/\btext-shadow-\w+\b/
|
|
437
|
+
];
|
|
438
|
+
slow_css_property_default = createRule7({
|
|
439
|
+
name: "slow-css-property",
|
|
440
|
+
meta: {
|
|
441
|
+
type: "problem",
|
|
442
|
+
docs: {
|
|
443
|
+
description: SlowCssProperty,
|
|
444
|
+
recommended: "warn"
|
|
445
|
+
},
|
|
446
|
+
fixable: undefined,
|
|
447
|
+
schema: [],
|
|
448
|
+
messages: {
|
|
449
|
+
SlowCssProperty
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
defaultOptions: [],
|
|
453
|
+
create: (context) => {
|
|
454
|
+
return {
|
|
455
|
+
Property: (node) => {
|
|
456
|
+
let propertyName;
|
|
457
|
+
if (node.key.type === "Identifier") {
|
|
458
|
+
propertyName = node.key.name;
|
|
459
|
+
} else if (node.key.type === "Literal" && typeof node.key.value === "string") {
|
|
460
|
+
propertyName = node.key.value;
|
|
461
|
+
}
|
|
462
|
+
if (!propertyName) {
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
const isSlowProperty = slowCssProperties.has(propertyName) || slowCssPropertiesKebab.has(propertyName);
|
|
466
|
+
if (isSlowProperty) {
|
|
467
|
+
context.report({
|
|
468
|
+
messageId: "SlowCssProperty",
|
|
469
|
+
node
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
JSXAttribute: (node) => {
|
|
474
|
+
if (node.name.type === "JSXIdentifier" && node.name.name === "className" && node.value) {
|
|
475
|
+
let classString;
|
|
476
|
+
if (node.value.type === "Literal" && typeof node.value.value === "string") {
|
|
477
|
+
classString = node.value.value;
|
|
478
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "Literal" && typeof node.value.expression.value === "string") {
|
|
479
|
+
classString = node.value.expression.value;
|
|
480
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "TemplateLiteral") {
|
|
481
|
+
const templateLiteral = node.value.expression;
|
|
482
|
+
classString = templateLiteral.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
|
|
483
|
+
}
|
|
484
|
+
if (classString && containsSlowTailwindClass(classString)) {
|
|
485
|
+
context.report({
|
|
486
|
+
messageId: "SlowCssProperty",
|
|
487
|
+
node
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
// src/rules/staticfile-no-relative.ts
|
|
498
|
+
import { ESLintUtils as ESLintUtils8 } from "@typescript-eslint/utils";
|
|
499
|
+
var createRule8, RelativePathStaticFile, AbsoluteStaticFile, PublicStaticFile, staticfile_no_relative_default;
|
|
500
|
+
var init_staticfile_no_relative = __esm(() => {
|
|
501
|
+
createRule8 = ESLintUtils8.RuleCreator(() => {
|
|
412
502
|
return `https://remotion.dev/docs/staticfile-relative-paths`;
|
|
413
503
|
});
|
|
414
504
|
RelativePathStaticFile = [
|
|
@@ -424,7 +514,7 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
424
514
|
"Do not prefix your assets with public/.",
|
|
425
515
|
"See: https://remotion.dev/docs/staticfile-relative-paths"
|
|
426
516
|
].join("");
|
|
427
|
-
staticfile_no_relative_default =
|
|
517
|
+
staticfile_no_relative_default = createRule8({
|
|
428
518
|
name: "staticfile-no-relative",
|
|
429
519
|
meta: {
|
|
430
520
|
type: "problem",
|
|
@@ -492,10 +582,10 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
492
582
|
});
|
|
493
583
|
|
|
494
584
|
// src/rules/staticfile-no-remote.ts
|
|
495
|
-
import { ESLintUtils as
|
|
496
|
-
var
|
|
585
|
+
import { ESLintUtils as ESLintUtils9 } from "@typescript-eslint/utils";
|
|
586
|
+
var createRule9, RelativePathStaticFile2, staticfile_no_remote_default;
|
|
497
587
|
var init_staticfile_no_remote = __esm(() => {
|
|
498
|
-
|
|
588
|
+
createRule9 = ESLintUtils9.RuleCreator(() => {
|
|
499
589
|
return `https://remotion.dev/docs/staticfile-remote-urls`;
|
|
500
590
|
});
|
|
501
591
|
RelativePathStaticFile2 = [
|
|
@@ -503,7 +593,7 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
503
593
|
"See: https://remotion.dev/docs/staticfile-remote-urls"
|
|
504
594
|
].join(`
|
|
505
595
|
`);
|
|
506
|
-
staticfile_no_remote_default =
|
|
596
|
+
staticfile_no_remote_default = createRule9({
|
|
507
597
|
name: "staticfile-no-remote",
|
|
508
598
|
meta: {
|
|
509
599
|
type: "problem",
|
|
@@ -557,10 +647,10 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
557
647
|
});
|
|
558
648
|
|
|
559
649
|
// src/rules/use-gif-component.ts
|
|
560
|
-
import { ESLintUtils as
|
|
561
|
-
var
|
|
650
|
+
import { ESLintUtils as ESLintUtils10 } from "@typescript-eslint/utils";
|
|
651
|
+
var createRule10, UseGifComponent, use_gif_component_default;
|
|
562
652
|
var init_use_gif_component = __esm(() => {
|
|
563
|
-
|
|
653
|
+
createRule10 = ESLintUtils10.RuleCreator(() => {
|
|
564
654
|
return `https://github.com/remotion-dev/remotion`;
|
|
565
655
|
});
|
|
566
656
|
UseGifComponent = [
|
|
@@ -569,7 +659,7 @@ var init_use_gif_component = __esm(() => {
|
|
|
569
659
|
"Ignore this message if this is a non-animated GIF."
|
|
570
660
|
].join(`
|
|
571
661
|
`);
|
|
572
|
-
use_gif_component_default =
|
|
662
|
+
use_gif_component_default = createRule10({
|
|
573
663
|
name: "use-gif-component",
|
|
574
664
|
meta: {
|
|
575
665
|
type: "problem",
|
|
@@ -646,13 +736,13 @@ var init_use_gif_component = __esm(() => {
|
|
|
646
736
|
});
|
|
647
737
|
|
|
648
738
|
// src/rules/v4-import.ts
|
|
649
|
-
import { ESLintUtils as
|
|
650
|
-
var
|
|
739
|
+
import { ESLintUtils as ESLintUtils11 } from "@typescript-eslint/utils";
|
|
740
|
+
var createRule11, ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'", rule, v4_import_default;
|
|
651
741
|
var init_v4_import = __esm(() => {
|
|
652
|
-
|
|
742
|
+
createRule11 = ESLintUtils11.RuleCreator(() => {
|
|
653
743
|
return `https://www.remotion.dev/docs/4-0-migration`;
|
|
654
744
|
});
|
|
655
|
-
rule =
|
|
745
|
+
rule = createRule11({
|
|
656
746
|
name: "v4-config-import",
|
|
657
747
|
meta: {
|
|
658
748
|
type: "problem",
|
|
@@ -688,13 +778,13 @@ var init_v4_import = __esm(() => {
|
|
|
688
778
|
});
|
|
689
779
|
|
|
690
780
|
// src/rules/volume-callback.ts
|
|
691
|
-
import { ESLintUtils as
|
|
692
|
-
var
|
|
781
|
+
import { ESLintUtils as ESLintUtils12 } from "@typescript-eslint/utils";
|
|
782
|
+
var createRule12, VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume", volume_callback_default;
|
|
693
783
|
var init_volume_callback = __esm(() => {
|
|
694
|
-
|
|
784
|
+
createRule12 = ESLintUtils12.RuleCreator(() => {
|
|
695
785
|
return `https://github.com/remotion-dev/remotion`;
|
|
696
786
|
});
|
|
697
|
-
volume_callback_default =
|
|
787
|
+
volume_callback_default = createRule12({
|
|
698
788
|
name: "volume-callback",
|
|
699
789
|
meta: {
|
|
700
790
|
type: "problem",
|
|
@@ -746,6 +836,12 @@ var init_volume_callback = __esm(() => {
|
|
|
746
836
|
if (expression.type === "ArrowFunctionExpression") {
|
|
747
837
|
return;
|
|
748
838
|
}
|
|
839
|
+
if (expression.type === "FunctionExpression") {
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
if (expression.type === "Identifier") {
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
749
845
|
context.report({
|
|
750
846
|
messageId: "VolumeCallback",
|
|
751
847
|
node
|
|
@@ -757,13 +853,13 @@ var init_volume_callback = __esm(() => {
|
|
|
757
853
|
});
|
|
758
854
|
|
|
759
855
|
// src/rules/warn-native-media-tag.ts
|
|
760
|
-
import { ESLintUtils as
|
|
761
|
-
var
|
|
856
|
+
import { ESLintUtils as ESLintUtils13 } from "@typescript-eslint/utils";
|
|
857
|
+
var createRule13, NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.", NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.", NoNativeAudioTag = "Use the <Audio /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.", NoNativeVideoTag = "Use the <OffthreadVideo /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.", warn_native_media_tag_default;
|
|
762
858
|
var init_warn_native_media_tag = __esm(() => {
|
|
763
|
-
|
|
859
|
+
createRule13 = ESLintUtils13.RuleCreator(() => {
|
|
764
860
|
return `https://github.com/remotion-dev/remotion`;
|
|
765
861
|
});
|
|
766
|
-
warn_native_media_tag_default =
|
|
862
|
+
warn_native_media_tag_default = createRule13({
|
|
767
863
|
name: "warn-native-media-tag",
|
|
768
864
|
meta: {
|
|
769
865
|
type: "problem",
|
|
@@ -860,6 +956,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
860
956
|
init_no_duration_frames_infinity();
|
|
861
957
|
init_no_from_0();
|
|
862
958
|
init_no_string_assets();
|
|
959
|
+
init_slow_css_property();
|
|
863
960
|
init_staticfile_no_relative();
|
|
864
961
|
init_staticfile_no_remote();
|
|
865
962
|
init_use_gif_component();
|
|
@@ -878,6 +975,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
878
975
|
"staticfile-no-relative": staticfile_no_relative_default,
|
|
879
976
|
"staticfile-no-remote": staticfile_no_remote_default,
|
|
880
977
|
"no-background-image": no_background_image_default,
|
|
978
|
+
"slow-css-property": slow_css_property_default,
|
|
881
979
|
"v4-config-import": v4_import_default
|
|
882
980
|
};
|
|
883
981
|
var recommendedRuleConfig = {
|
|
@@ -892,6 +990,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
892
990
|
"@remotion/staticfile-no-relative": "error",
|
|
893
991
|
"@remotion/staticfile-no-remote": "error",
|
|
894
992
|
"@remotion/no-background-image": "error",
|
|
993
|
+
"@remotion/slow-css-property": "warn",
|
|
895
994
|
"@remotion/v4-config-import": "error"
|
|
896
995
|
};
|
|
897
996
|
var configs = {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare const _default: {
|
|
|
13
13
|
readonly '@remotion/staticfile-no-relative': "error";
|
|
14
14
|
readonly '@remotion/staticfile-no-remote': "error";
|
|
15
15
|
readonly '@remotion/no-background-image': "error";
|
|
16
|
+
readonly '@remotion/slow-css-property': "warn";
|
|
16
17
|
readonly '@remotion/v4-config-import': "error";
|
|
17
18
|
};
|
|
18
19
|
readonly plugins: readonly ["@remotion"];
|
|
@@ -30,6 +31,7 @@ declare const _default: {
|
|
|
30
31
|
'staticfile-no-relative': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile" | "AbsoluteStaticFile" | "PublicStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
31
32
|
'staticfile-no-remote': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
32
33
|
'no-background-image': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"BackgroundImage", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
34
|
+
'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
33
35
|
'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
34
36
|
};
|
|
35
37
|
flatPlugin: {
|
|
@@ -45,6 +47,7 @@ declare const _default: {
|
|
|
45
47
|
readonly '@remotion/staticfile-no-relative': "error";
|
|
46
48
|
readonly '@remotion/staticfile-no-remote': "error";
|
|
47
49
|
readonly '@remotion/no-background-image': "error";
|
|
50
|
+
readonly '@remotion/slow-css-property': "warn";
|
|
48
51
|
readonly '@remotion/v4-config-import': "error";
|
|
49
52
|
};
|
|
50
53
|
plugins: {
|
|
@@ -61,6 +64,7 @@ declare const _default: {
|
|
|
61
64
|
'staticfile-no-relative': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile" | "AbsoluteStaticFile" | "PublicStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
62
65
|
'staticfile-no-remote': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
63
66
|
'no-background-image': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"BackgroundImage", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
67
|
+
'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
64
68
|
'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
65
69
|
};
|
|
66
70
|
};
|
package/package.json
CHANGED