@remotion/eslint-plugin 4.0.341 → 4.0.344

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 CHANGED
@@ -386,9 +386,112 @@ var no_string_assets_default = createRule6({
386
386
  }
387
387
  });
388
388
 
389
- // src/rules/slow-css-property.ts
389
+ // src/rules/non-pure-animation.ts
390
390
  var import_utils7 = require("@typescript-eslint/utils");
391
391
  var createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
392
+ return "https://www.remotion.dev/docs/flickering";
393
+ });
394
+ var NonPureAnimation = [
395
+ "This animation does not run purely off useCurrentFrame() and will lead to flickering.",
396
+ "See: https://www.remotion.dev/docs/flickering"
397
+ ].join(`
398
+ `);
399
+ var nonPureAnimationProperties = new Set(["transition"]);
400
+ var nonPureAnimationPropertiesKebab = new Set(["transition"]);
401
+ var nonPureAnimationTailwindClasses = [
402
+ /\btransition-\w+\b/,
403
+ /\btransition\b/
404
+ ];
405
+ function findProblematicTailwindClass(classString) {
406
+ for (const pattern of nonPureAnimationTailwindClasses) {
407
+ const match = classString.match(pattern);
408
+ if (match) {
409
+ return {
410
+ match: match[0],
411
+ index: match.index
412
+ };
413
+ }
414
+ }
415
+ return null;
416
+ }
417
+ var non_pure_animation_default = createRule7({
418
+ name: "non-pure-animation",
419
+ meta: {
420
+ type: "problem",
421
+ docs: {
422
+ description: NonPureAnimation,
423
+ recommended: "warn"
424
+ },
425
+ fixable: undefined,
426
+ schema: [],
427
+ messages: {
428
+ NonPureAnimation
429
+ }
430
+ },
431
+ defaultOptions: [],
432
+ create: (context) => {
433
+ return {
434
+ Property: (node) => {
435
+ let propertyName;
436
+ if (node.key.type === "Identifier") {
437
+ propertyName = node.key.name;
438
+ } else if (node.key.type === "Literal" && typeof node.key.value === "string") {
439
+ propertyName = node.key.value;
440
+ }
441
+ if (!propertyName) {
442
+ return;
443
+ }
444
+ const isNonPureProperty = nonPureAnimationProperties.has(propertyName) || nonPureAnimationPropertiesKebab.has(propertyName);
445
+ if (isNonPureProperty) {
446
+ context.report({
447
+ messageId: "NonPureAnimation",
448
+ node
449
+ });
450
+ }
451
+ },
452
+ JSXAttribute: (node) => {
453
+ if (node.name.type === "JSXIdentifier" && node.name.name === "className" && node.value) {
454
+ let classString;
455
+ let valueNode;
456
+ if (node.value.type === "Literal" && typeof node.value.value === "string") {
457
+ classString = node.value.value;
458
+ valueNode = node.value;
459
+ } else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "Literal" && typeof node.value.expression.value === "string") {
460
+ classString = node.value.expression.value;
461
+ valueNode = node.value.expression;
462
+ } else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "TemplateLiteral") {
463
+ const templateLiteral = node.value.expression;
464
+ classString = templateLiteral.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
465
+ valueNode = templateLiteral;
466
+ }
467
+ if (classString) {
468
+ const problematicClass = findProblematicTailwindClass(classString);
469
+ if (problematicClass) {
470
+ const sourceCode = context.getSourceCode();
471
+ const valueStart = valueNode.range[0];
472
+ const quoteOffset = valueNode.type === "Literal" ? 1 : 0;
473
+ const classStart = valueStart + quoteOffset + problematicClass.index;
474
+ const classEnd = classStart + problematicClass.match.length;
475
+ const start = sourceCode.getLocFromIndex(classStart);
476
+ const end = sourceCode.getLocFromIndex(classEnd);
477
+ context.report({
478
+ messageId: "NonPureAnimation",
479
+ loc: {
480
+ start,
481
+ end
482
+ }
483
+ });
484
+ }
485
+ }
486
+ }
487
+ }
488
+ };
489
+ }
490
+ });
491
+
492
+ // src/rules/slow-css-property.ts
493
+ var import_utils8 = require("@typescript-eslint/utils");
494
+ var createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
392
495
  return "https://remotion.dev/docs/gpu";
393
496
  });
394
497
  var SlowCssProperty = [
@@ -415,7 +518,7 @@ var slowTailwindClasses = [
415
518
  function containsSlowTailwindClass(classString) {
416
519
  return slowTailwindClasses.some((pattern) => pattern.test(classString));
417
520
  }
418
- var slow_css_property_default = createRule7({
521
+ var slow_css_property_default = createRule8({
419
522
  name: "slow-css-property",
420
523
  meta: {
421
524
  type: "problem",
@@ -474,8 +577,8 @@ var slow_css_property_default = createRule7({
474
577
  });
475
578
 
476
579
  // src/rules/staticfile-no-relative.ts
477
- var import_utils8 = require("@typescript-eslint/utils");
478
- var createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
580
+ var import_utils9 = require("@typescript-eslint/utils");
581
+ var createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
479
582
  return `https://remotion.dev/docs/staticfile-relative-paths`;
480
583
  });
481
584
  var RelativePathStaticFile = [
@@ -491,7 +594,7 @@ var PublicStaticFile = [
491
594
  "Do not prefix your assets with public/.",
492
595
  "See: https://remotion.dev/docs/staticfile-relative-paths"
493
596
  ].join("");
494
- var staticfile_no_relative_default = createRule8({
597
+ var staticfile_no_relative_default = createRule9({
495
598
  name: "staticfile-no-relative",
496
599
  meta: {
497
600
  type: "problem",
@@ -558,8 +661,8 @@ var staticfile_no_relative_default = createRule8({
558
661
  });
559
662
 
560
663
  // src/rules/staticfile-no-remote.ts
561
- var import_utils9 = require("@typescript-eslint/utils");
562
- var createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
664
+ var import_utils10 = require("@typescript-eslint/utils");
665
+ var createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
563
666
  return `https://remotion.dev/docs/staticfile-remote-urls`;
564
667
  });
565
668
  var RelativePathStaticFile2 = [
@@ -567,7 +670,7 @@ var RelativePathStaticFile2 = [
567
670
  "See: https://remotion.dev/docs/staticfile-remote-urls"
568
671
  ].join(`
569
672
  `);
570
- var staticfile_no_remote_default = createRule9({
673
+ var staticfile_no_remote_default = createRule10({
571
674
  name: "staticfile-no-remote",
572
675
  meta: {
573
676
  type: "problem",
@@ -620,8 +723,8 @@ var staticfile_no_remote_default = createRule9({
620
723
  });
621
724
 
622
725
  // src/rules/use-gif-component.ts
623
- var import_utils10 = require("@typescript-eslint/utils");
624
- var createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
726
+ var import_utils11 = require("@typescript-eslint/utils");
727
+ var createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
625
728
  return `https://github.com/remotion-dev/remotion`;
626
729
  });
627
730
  var UseGifComponent = [
@@ -630,7 +733,7 @@ var UseGifComponent = [
630
733
  "Ignore this message if this is a non-animated GIF."
631
734
  ].join(`
632
735
  `);
633
- var use_gif_component_default = createRule10({
736
+ var use_gif_component_default = createRule11({
634
737
  name: "use-gif-component",
635
738
  meta: {
636
739
  type: "problem",
@@ -706,12 +809,12 @@ var use_gif_component_default = createRule10({
706
809
  });
707
810
 
708
811
  // src/rules/v4-import.ts
709
- var import_utils11 = require("@typescript-eslint/utils");
710
- var createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
812
+ var import_utils12 = require("@typescript-eslint/utils");
813
+ var createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
711
814
  return `https://www.remotion.dev/docs/4-0-migration`;
712
815
  });
713
816
  var ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
714
- var rule = createRule11({
817
+ var rule = createRule12({
715
818
  name: "v4-config-import",
716
819
  meta: {
717
820
  type: "problem",
@@ -746,12 +849,12 @@ var rule = createRule11({
746
849
  var v4_import_default = rule;
747
850
 
748
851
  // src/rules/volume-callback.ts
749
- var import_utils12 = require("@typescript-eslint/utils");
750
- var createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
852
+ var import_utils13 = require("@typescript-eslint/utils");
853
+ var createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
751
854
  return `https://github.com/remotion-dev/remotion`;
752
855
  });
753
856
  var VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume";
754
- var volume_callback_default = createRule12({
857
+ var volume_callback_default = createRule13({
755
858
  name: "volume-callback",
756
859
  meta: {
757
860
  type: "problem",
@@ -819,15 +922,15 @@ var volume_callback_default = createRule12({
819
922
  });
820
923
 
821
924
  // src/rules/warn-native-media-tag.ts
822
- var import_utils13 = require("@typescript-eslint/utils");
823
- var createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
925
+ var import_utils14 = require("@typescript-eslint/utils");
926
+ var createRule14 = import_utils14.ESLintUtils.RuleCreator(() => {
824
927
  return `https://github.com/remotion-dev/remotion`;
825
928
  });
826
929
  var NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.";
827
930
  var NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.";
828
931
  var NoNativeAudioTag = "Use the <Audio /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
829
932
  var NoNativeVideoTag = "Use the <OffthreadVideo /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
830
- var warn_native_media_tag_default = createRule13({
933
+ var warn_native_media_tag_default = createRule14({
831
934
  name: "warn-native-media-tag",
832
935
  meta: {
833
936
  type: "problem",
@@ -928,6 +1031,7 @@ var rules = {
928
1031
  "staticfile-no-relative": staticfile_no_relative_default,
929
1032
  "staticfile-no-remote": staticfile_no_remote_default,
930
1033
  "no-background-image": no_background_image_default,
1034
+ "non-pure-animation": non_pure_animation_default,
931
1035
  "slow-css-property": slow_css_property_default,
932
1036
  "v4-config-import": v4_import_default
933
1037
  };
@@ -943,6 +1047,7 @@ var recommendedRuleConfig = {
943
1047
  "@remotion/staticfile-no-relative": "error",
944
1048
  "@remotion/staticfile-no-remote": "error",
945
1049
  "@remotion/no-background-image": "error",
1050
+ "@remotion/non-pure-animation": "warn",
946
1051
  "@remotion/slow-css-property": "warn",
947
1052
  "@remotion/v4-config-import": "error"
948
1053
  };
@@ -404,14 +404,120 @@ var init_no_string_assets = __esm(() => {
404
404
  });
405
405
  });
406
406
 
407
- // src/rules/slow-css-property.ts
407
+ // src/rules/non-pure-animation.ts
408
408
  import { ESLintUtils as ESLintUtils7 } from "@typescript-eslint/utils";
409
+ function findProblematicTailwindClass(classString) {
410
+ for (const pattern of nonPureAnimationTailwindClasses) {
411
+ const match = classString.match(pattern);
412
+ if (match) {
413
+ return {
414
+ match: match[0],
415
+ index: match.index
416
+ };
417
+ }
418
+ }
419
+ return null;
420
+ }
421
+ var createRule7, NonPureAnimation, nonPureAnimationProperties, nonPureAnimationPropertiesKebab, nonPureAnimationTailwindClasses, non_pure_animation_default;
422
+ var init_non_pure_animation = __esm(() => {
423
+ createRule7 = ESLintUtils7.RuleCreator(() => {
424
+ return "https://www.remotion.dev/docs/flickering";
425
+ });
426
+ NonPureAnimation = [
427
+ "This animation does not run purely off useCurrentFrame() and will lead to flickering.",
428
+ "See: https://www.remotion.dev/docs/flickering"
429
+ ].join(`
430
+ `);
431
+ nonPureAnimationProperties = new Set(["transition"]);
432
+ nonPureAnimationPropertiesKebab = new Set(["transition"]);
433
+ nonPureAnimationTailwindClasses = [
434
+ /\btransition-\w+\b/,
435
+ /\btransition\b/
436
+ ];
437
+ non_pure_animation_default = createRule7({
438
+ name: "non-pure-animation",
439
+ meta: {
440
+ type: "problem",
441
+ docs: {
442
+ description: NonPureAnimation,
443
+ recommended: "warn"
444
+ },
445
+ fixable: undefined,
446
+ schema: [],
447
+ messages: {
448
+ NonPureAnimation
449
+ }
450
+ },
451
+ defaultOptions: [],
452
+ create: (context) => {
453
+ return {
454
+ Property: (node) => {
455
+ let propertyName;
456
+ if (node.key.type === "Identifier") {
457
+ propertyName = node.key.name;
458
+ } else if (node.key.type === "Literal" && typeof node.key.value === "string") {
459
+ propertyName = node.key.value;
460
+ }
461
+ if (!propertyName) {
462
+ return;
463
+ }
464
+ const isNonPureProperty = nonPureAnimationProperties.has(propertyName) || nonPureAnimationPropertiesKebab.has(propertyName);
465
+ if (isNonPureProperty) {
466
+ context.report({
467
+ messageId: "NonPureAnimation",
468
+ node
469
+ });
470
+ }
471
+ },
472
+ JSXAttribute: (node) => {
473
+ if (node.name.type === "JSXIdentifier" && node.name.name === "className" && node.value) {
474
+ let classString;
475
+ let valueNode;
476
+ if (node.value.type === "Literal" && typeof node.value.value === "string") {
477
+ classString = node.value.value;
478
+ valueNode = node.value;
479
+ } else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "Literal" && typeof node.value.expression.value === "string") {
480
+ classString = node.value.expression.value;
481
+ valueNode = node.value.expression;
482
+ } else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "TemplateLiteral") {
483
+ const templateLiteral = node.value.expression;
484
+ classString = templateLiteral.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
485
+ valueNode = templateLiteral;
486
+ }
487
+ if (classString) {
488
+ const problematicClass = findProblematicTailwindClass(classString);
489
+ if (problematicClass) {
490
+ const sourceCode = context.getSourceCode();
491
+ const valueStart = valueNode.range[0];
492
+ const quoteOffset = valueNode.type === "Literal" ? 1 : 0;
493
+ const classStart = valueStart + quoteOffset + problematicClass.index;
494
+ const classEnd = classStart + problematicClass.match.length;
495
+ const start = sourceCode.getLocFromIndex(classStart);
496
+ const end = sourceCode.getLocFromIndex(classEnd);
497
+ context.report({
498
+ messageId: "NonPureAnimation",
499
+ loc: {
500
+ start,
501
+ end
502
+ }
503
+ });
504
+ }
505
+ }
506
+ }
507
+ }
508
+ };
509
+ }
510
+ });
511
+ });
512
+
513
+ // src/rules/slow-css-property.ts
514
+ import { ESLintUtils as ESLintUtils8 } from "@typescript-eslint/utils";
409
515
  function containsSlowTailwindClass(classString) {
410
516
  return slowTailwindClasses.some((pattern) => pattern.test(classString));
411
517
  }
412
- var createRule7, SlowCssProperty, slowCssProperties, slowCssPropertiesKebab, slowTailwindClasses, slow_css_property_default;
518
+ var createRule8, SlowCssProperty, slowCssProperties, slowCssPropertiesKebab, slowTailwindClasses, slow_css_property_default;
413
519
  var init_slow_css_property = __esm(() => {
414
- createRule7 = ESLintUtils7.RuleCreator(() => {
520
+ createRule8 = ESLintUtils8.RuleCreator(() => {
415
521
  return "https://remotion.dev/docs/gpu";
416
522
  });
417
523
  SlowCssProperty = [
@@ -435,7 +541,7 @@ var init_slow_css_property = __esm(() => {
435
541
  /\bsepia(?:-\d+)?\b/,
436
542
  /\btext-shadow-\w+\b/
437
543
  ];
438
- slow_css_property_default = createRule7({
544
+ slow_css_property_default = createRule8({
439
545
  name: "slow-css-property",
440
546
  meta: {
441
547
  type: "problem",
@@ -495,10 +601,10 @@ var init_slow_css_property = __esm(() => {
495
601
  });
496
602
 
497
603
  // 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;
604
+ import { ESLintUtils as ESLintUtils9 } from "@typescript-eslint/utils";
605
+ var createRule9, RelativePathStaticFile, AbsoluteStaticFile, PublicStaticFile, staticfile_no_relative_default;
500
606
  var init_staticfile_no_relative = __esm(() => {
501
- createRule8 = ESLintUtils8.RuleCreator(() => {
607
+ createRule9 = ESLintUtils9.RuleCreator(() => {
502
608
  return `https://remotion.dev/docs/staticfile-relative-paths`;
503
609
  });
504
610
  RelativePathStaticFile = [
@@ -514,7 +620,7 @@ var init_staticfile_no_relative = __esm(() => {
514
620
  "Do not prefix your assets with public/.",
515
621
  "See: https://remotion.dev/docs/staticfile-relative-paths"
516
622
  ].join("");
517
- staticfile_no_relative_default = createRule8({
623
+ staticfile_no_relative_default = createRule9({
518
624
  name: "staticfile-no-relative",
519
625
  meta: {
520
626
  type: "problem",
@@ -582,10 +688,10 @@ var init_staticfile_no_relative = __esm(() => {
582
688
  });
583
689
 
584
690
  // src/rules/staticfile-no-remote.ts
585
- import { ESLintUtils as ESLintUtils9 } from "@typescript-eslint/utils";
586
- var createRule9, RelativePathStaticFile2, staticfile_no_remote_default;
691
+ import { ESLintUtils as ESLintUtils10 } from "@typescript-eslint/utils";
692
+ var createRule10, RelativePathStaticFile2, staticfile_no_remote_default;
587
693
  var init_staticfile_no_remote = __esm(() => {
588
- createRule9 = ESLintUtils9.RuleCreator(() => {
694
+ createRule10 = ESLintUtils10.RuleCreator(() => {
589
695
  return `https://remotion.dev/docs/staticfile-remote-urls`;
590
696
  });
591
697
  RelativePathStaticFile2 = [
@@ -593,7 +699,7 @@ var init_staticfile_no_remote = __esm(() => {
593
699
  "See: https://remotion.dev/docs/staticfile-remote-urls"
594
700
  ].join(`
595
701
  `);
596
- staticfile_no_remote_default = createRule9({
702
+ staticfile_no_remote_default = createRule10({
597
703
  name: "staticfile-no-remote",
598
704
  meta: {
599
705
  type: "problem",
@@ -647,10 +753,10 @@ var init_staticfile_no_remote = __esm(() => {
647
753
  });
648
754
 
649
755
  // src/rules/use-gif-component.ts
650
- import { ESLintUtils as ESLintUtils10 } from "@typescript-eslint/utils";
651
- var createRule10, UseGifComponent, use_gif_component_default;
756
+ import { ESLintUtils as ESLintUtils11 } from "@typescript-eslint/utils";
757
+ var createRule11, UseGifComponent, use_gif_component_default;
652
758
  var init_use_gif_component = __esm(() => {
653
- createRule10 = ESLintUtils10.RuleCreator(() => {
759
+ createRule11 = ESLintUtils11.RuleCreator(() => {
654
760
  return `https://github.com/remotion-dev/remotion`;
655
761
  });
656
762
  UseGifComponent = [
@@ -659,7 +765,7 @@ var init_use_gif_component = __esm(() => {
659
765
  "Ignore this message if this is a non-animated GIF."
660
766
  ].join(`
661
767
  `);
662
- use_gif_component_default = createRule10({
768
+ use_gif_component_default = createRule11({
663
769
  name: "use-gif-component",
664
770
  meta: {
665
771
  type: "problem",
@@ -736,13 +842,13 @@ var init_use_gif_component = __esm(() => {
736
842
  });
737
843
 
738
844
  // src/rules/v4-import.ts
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;
845
+ import { ESLintUtils as ESLintUtils12 } from "@typescript-eslint/utils";
846
+ var createRule12, ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'", rule, v4_import_default;
741
847
  var init_v4_import = __esm(() => {
742
- createRule11 = ESLintUtils11.RuleCreator(() => {
848
+ createRule12 = ESLintUtils12.RuleCreator(() => {
743
849
  return `https://www.remotion.dev/docs/4-0-migration`;
744
850
  });
745
- rule = createRule11({
851
+ rule = createRule12({
746
852
  name: "v4-config-import",
747
853
  meta: {
748
854
  type: "problem",
@@ -778,13 +884,13 @@ var init_v4_import = __esm(() => {
778
884
  });
779
885
 
780
886
  // src/rules/volume-callback.ts
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;
887
+ import { ESLintUtils as ESLintUtils13 } from "@typescript-eslint/utils";
888
+ var createRule13, VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume", volume_callback_default;
783
889
  var init_volume_callback = __esm(() => {
784
- createRule12 = ESLintUtils12.RuleCreator(() => {
890
+ createRule13 = ESLintUtils13.RuleCreator(() => {
785
891
  return `https://github.com/remotion-dev/remotion`;
786
892
  });
787
- volume_callback_default = createRule12({
893
+ volume_callback_default = createRule13({
788
894
  name: "volume-callback",
789
895
  meta: {
790
896
  type: "problem",
@@ -853,13 +959,13 @@ var init_volume_callback = __esm(() => {
853
959
  });
854
960
 
855
961
  // src/rules/warn-native-media-tag.ts
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;
962
+ import { ESLintUtils as ESLintUtils14 } from "@typescript-eslint/utils";
963
+ var createRule14, 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;
858
964
  var init_warn_native_media_tag = __esm(() => {
859
- createRule13 = ESLintUtils13.RuleCreator(() => {
965
+ createRule14 = ESLintUtils14.RuleCreator(() => {
860
966
  return `https://github.com/remotion-dev/remotion`;
861
967
  });
862
- warn_native_media_tag_default = createRule13({
968
+ warn_native_media_tag_default = createRule14({
863
969
  name: "warn-native-media-tag",
864
970
  meta: {
865
971
  type: "problem",
@@ -956,6 +1062,7 @@ var require_src = __commonJS((exports, module) => {
956
1062
  init_no_duration_frames_infinity();
957
1063
  init_no_from_0();
958
1064
  init_no_string_assets();
1065
+ init_non_pure_animation();
959
1066
  init_slow_css_property();
960
1067
  init_staticfile_no_relative();
961
1068
  init_staticfile_no_remote();
@@ -975,6 +1082,7 @@ var require_src = __commonJS((exports, module) => {
975
1082
  "staticfile-no-relative": staticfile_no_relative_default,
976
1083
  "staticfile-no-remote": staticfile_no_remote_default,
977
1084
  "no-background-image": no_background_image_default,
1085
+ "non-pure-animation": non_pure_animation_default,
978
1086
  "slow-css-property": slow_css_property_default,
979
1087
  "v4-config-import": v4_import_default
980
1088
  };
@@ -990,6 +1098,7 @@ var require_src = __commonJS((exports, module) => {
990
1098
  "@remotion/staticfile-no-relative": "error",
991
1099
  "@remotion/staticfile-no-remote": "error",
992
1100
  "@remotion/no-background-image": "error",
1101
+ "@remotion/non-pure-animation": "warn",
993
1102
  "@remotion/slow-css-property": "warn",
994
1103
  "@remotion/v4-config-import": "error"
995
1104
  };
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/non-pure-animation': "warn";
16
17
  readonly '@remotion/slow-css-property': "warn";
17
18
  readonly '@remotion/v4-config-import': "error";
18
19
  };
@@ -31,6 +32,7 @@ declare const _default: {
31
32
  'staticfile-no-relative': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile" | "AbsoluteStaticFile" | "PublicStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
32
33
  'staticfile-no-remote': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
33
34
  'no-background-image': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"BackgroundImage", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
35
+ 'non-pure-animation': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NonPureAnimation", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
34
36
  'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
35
37
  'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
36
38
  };
@@ -47,6 +49,7 @@ declare const _default: {
47
49
  readonly '@remotion/staticfile-no-relative': "error";
48
50
  readonly '@remotion/staticfile-no-remote': "error";
49
51
  readonly '@remotion/no-background-image': "error";
52
+ readonly '@remotion/non-pure-animation': "warn";
50
53
  readonly '@remotion/slow-css-property': "warn";
51
54
  readonly '@remotion/v4-config-import': "error";
52
55
  };
@@ -64,6 +67,7 @@ declare const _default: {
64
67
  'staticfile-no-relative': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile" | "AbsoluteStaticFile" | "PublicStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
65
68
  'staticfile-no-remote': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"RelativePathStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
66
69
  'no-background-image': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"BackgroundImage", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
70
+ 'non-pure-animation': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NonPureAnimation", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
67
71
  'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
68
72
  'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
69
73
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NonPureAnimation", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
2
+ export default _default;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/eslint-plugin"
4
4
  },
5
5
  "name": "@remotion/eslint-plugin",
6
- "version": "4.0.341",
6
+ "version": "4.0.344",
7
7
  "description": "Rules for writing Remotion code",
8
8
  "main": "dist/index.js",
9
9
  "bugs": {