@remotion/eslint-plugin 4.0.440 → 4.0.442

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
@@ -312,9 +312,96 @@ var no_from_0_default = createRule5({
312
312
  }
313
313
  });
314
314
 
315
- // src/rules/no-string-assets.ts
315
+ // src/rules/no-object-fit-on-media-video.ts
316
316
  var import_utils6 = require("@typescript-eslint/utils");
317
317
  var createRule6 = import_utils6.ESLintUtils.RuleCreator(() => {
318
+ return "https://remotion.dev/docs/media/video#objectfit";
319
+ });
320
+ var NoObjectFitInStyle = [
321
+ "Passing `objectFit` via the `style` prop is not supported for `<Video>` from `@remotion/media`.",
322
+ "Use the `objectFit` prop directly instead.",
323
+ "See: https://remotion.dev/docs/media/video#objectfit"
324
+ ].join(`
325
+ `);
326
+ var NoObjectFitInClassName = [
327
+ "Passing an `object-fit` CSS class via `className` is not supported for `<Video>` from `@remotion/media`.",
328
+ "Use the `objectFit` prop directly instead.",
329
+ "See: https://remotion.dev/docs/media/video#objectfit"
330
+ ].join(`
331
+ `);
332
+ var objectFitClassPattern = /\bobject-(contain|cover|fill|none|scale-down)\b/;
333
+ var no_object_fit_on_media_video_default = createRule6({
334
+ name: "no-object-fit-on-media-video",
335
+ meta: {
336
+ type: "problem",
337
+ docs: {
338
+ description: NoObjectFitInStyle,
339
+ recommended: "warn"
340
+ },
341
+ fixable: undefined,
342
+ schema: [],
343
+ messages: {
344
+ NoObjectFitInStyle,
345
+ NoObjectFitInClassName
346
+ }
347
+ },
348
+ defaultOptions: [],
349
+ create: (context) => {
350
+ return {
351
+ JSXOpeningElement: (node) => {
352
+ if (node.name.type !== "JSXIdentifier" || node.name.name !== "Video") {
353
+ return;
354
+ }
355
+ for (const attr of node.attributes) {
356
+ if (attr.type !== "JSXAttribute") {
357
+ continue;
358
+ }
359
+ if (attr.name.type === "JSXIdentifier" && attr.name.name === "style" && attr.value) {
360
+ if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "ObjectExpression") {
361
+ for (const prop of attr.value.expression.properties) {
362
+ if (prop.type !== "Property") {
363
+ continue;
364
+ }
365
+ let propertyName;
366
+ if (prop.key.type === "Identifier") {
367
+ propertyName = prop.key.name;
368
+ } else if (prop.key.type === "Literal" && typeof prop.key.value === "string") {
369
+ propertyName = prop.key.value;
370
+ }
371
+ if (propertyName === "objectFit" || propertyName === "object-fit") {
372
+ context.report({
373
+ messageId: "NoObjectFitInStyle",
374
+ node: prop
375
+ });
376
+ }
377
+ }
378
+ }
379
+ }
380
+ if (attr.name.type === "JSXIdentifier" && attr.name.name === "className" && attr.value) {
381
+ let classString;
382
+ if (attr.value.type === "Literal" && typeof attr.value.value === "string") {
383
+ classString = attr.value.value;
384
+ } else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "Literal" && typeof attr.value.expression.value === "string") {
385
+ classString = attr.value.expression.value;
386
+ } else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "TemplateLiteral") {
387
+ classString = attr.value.expression.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
388
+ }
389
+ if (classString && objectFitClassPattern.test(classString)) {
390
+ context.report({
391
+ messageId: "NoObjectFitInClassName",
392
+ node: attr
393
+ });
394
+ }
395
+ }
396
+ }
397
+ }
398
+ };
399
+ }
400
+ });
401
+
402
+ // src/rules/no-string-assets.ts
403
+ var import_utils7 = require("@typescript-eslint/utils");
404
+ var createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
318
405
  return `https://github.com/remotion-dev/remotion`;
319
406
  });
320
407
  var NoStringAssets = [
@@ -322,7 +409,7 @@ var NoStringAssets = [
322
409
  "See: https://www.remotion.dev/docs/assets"
323
410
  ].join(`
324
411
  `);
325
- var no_string_assets_default = createRule6({
412
+ var no_string_assets_default = createRule7({
326
413
  name: "no-string-assets",
327
414
  meta: {
328
415
  type: "problem",
@@ -387,8 +474,8 @@ var no_string_assets_default = createRule6({
387
474
  });
388
475
 
389
476
  // src/rules/non-pure-animation.ts
390
- var import_utils7 = require("@typescript-eslint/utils");
391
- var createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
477
+ var import_utils8 = require("@typescript-eslint/utils");
478
+ var createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
392
479
  return "https://www.remotion.dev/docs/flickering";
393
480
  });
394
481
  var NonPureAnimation = [
@@ -414,7 +501,7 @@ function findProblematicTailwindClass(classString) {
414
501
  }
415
502
  return null;
416
503
  }
417
- var non_pure_animation_default = createRule7({
504
+ var non_pure_animation_default = createRule8({
418
505
  name: "non-pure-animation",
419
506
  meta: {
420
507
  type: "problem",
@@ -490,8 +577,8 @@ var non_pure_animation_default = createRule7({
490
577
  });
491
578
 
492
579
  // src/rules/slow-css-property.ts
493
- var import_utils8 = require("@typescript-eslint/utils");
494
- var createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
580
+ var import_utils9 = require("@typescript-eslint/utils");
581
+ var createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
495
582
  return "https://remotion.dev/docs/gpu";
496
583
  });
497
584
  var SlowCssProperty = [
@@ -518,7 +605,7 @@ var slowTailwindClasses = [
518
605
  function containsSlowTailwindClass(classString) {
519
606
  return slowTailwindClasses.some((pattern) => pattern.test(classString));
520
607
  }
521
- var slow_css_property_default = createRule8({
608
+ var slow_css_property_default = createRule9({
522
609
  name: "slow-css-property",
523
610
  meta: {
524
611
  type: "problem",
@@ -577,8 +664,8 @@ var slow_css_property_default = createRule8({
577
664
  });
578
665
 
579
666
  // src/rules/staticfile-no-relative.ts
580
- var import_utils9 = require("@typescript-eslint/utils");
581
- var createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
667
+ var import_utils10 = require("@typescript-eslint/utils");
668
+ var createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
582
669
  return `https://remotion.dev/docs/staticfile-relative-paths`;
583
670
  });
584
671
  var RelativePathStaticFile = [
@@ -594,7 +681,7 @@ var PublicStaticFile = [
594
681
  "Do not prefix your assets with public/.",
595
682
  "See: https://remotion.dev/docs/staticfile-relative-paths"
596
683
  ].join("");
597
- var staticfile_no_relative_default = createRule9({
684
+ var staticfile_no_relative_default = createRule10({
598
685
  name: "staticfile-no-relative",
599
686
  meta: {
600
687
  type: "problem",
@@ -661,8 +748,8 @@ var staticfile_no_relative_default = createRule9({
661
748
  });
662
749
 
663
750
  // src/rules/staticfile-no-remote.ts
664
- var import_utils10 = require("@typescript-eslint/utils");
665
- var createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
751
+ var import_utils11 = require("@typescript-eslint/utils");
752
+ var createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
666
753
  return `https://remotion.dev/docs/staticfile-remote-urls`;
667
754
  });
668
755
  var RelativePathStaticFile2 = [
@@ -670,7 +757,7 @@ var RelativePathStaticFile2 = [
670
757
  "See: https://remotion.dev/docs/staticfile-remote-urls"
671
758
  ].join(`
672
759
  `);
673
- var staticfile_no_remote_default = createRule10({
760
+ var staticfile_no_remote_default = createRule11({
674
761
  name: "staticfile-no-remote",
675
762
  meta: {
676
763
  type: "problem",
@@ -723,8 +810,8 @@ var staticfile_no_remote_default = createRule10({
723
810
  });
724
811
 
725
812
  // src/rules/use-gif-component.ts
726
- var import_utils11 = require("@typescript-eslint/utils");
727
- var createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
813
+ var import_utils12 = require("@typescript-eslint/utils");
814
+ var createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
728
815
  return `https://github.com/remotion-dev/remotion`;
729
816
  });
730
817
  var UseGifComponent = [
@@ -733,7 +820,7 @@ var UseGifComponent = [
733
820
  "Ignore this message if this is a non-animated GIF."
734
821
  ].join(`
735
822
  `);
736
- var use_gif_component_default = createRule11({
823
+ var use_gif_component_default = createRule12({
737
824
  name: "use-gif-component",
738
825
  meta: {
739
826
  type: "problem",
@@ -809,12 +896,12 @@ var use_gif_component_default = createRule11({
809
896
  });
810
897
 
811
898
  // src/rules/v4-import.ts
812
- var import_utils12 = require("@typescript-eslint/utils");
813
- var createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
899
+ var import_utils13 = require("@typescript-eslint/utils");
900
+ var createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
814
901
  return `https://www.remotion.dev/docs/4-0-migration`;
815
902
  });
816
903
  var ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
817
- var rule = createRule12({
904
+ var rule = createRule13({
818
905
  name: "v4-config-import",
819
906
  meta: {
820
907
  type: "problem",
@@ -849,12 +936,12 @@ var rule = createRule12({
849
936
  var v4_import_default = rule;
850
937
 
851
938
  // src/rules/volume-callback.ts
852
- var import_utils13 = require("@typescript-eslint/utils");
853
- var createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
939
+ var import_utils14 = require("@typescript-eslint/utils");
940
+ var createRule14 = import_utils14.ESLintUtils.RuleCreator(() => {
854
941
  return `https://github.com/remotion-dev/remotion`;
855
942
  });
856
943
  var VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume";
857
- var volume_callback_default = createRule13({
944
+ var volume_callback_default = createRule14({
858
945
  name: "volume-callback",
859
946
  meta: {
860
947
  type: "problem",
@@ -922,15 +1009,15 @@ var volume_callback_default = createRule13({
922
1009
  });
923
1010
 
924
1011
  // src/rules/warn-native-media-tag.ts
925
- var import_utils14 = require("@typescript-eslint/utils");
926
- var createRule14 = import_utils14.ESLintUtils.RuleCreator(() => {
1012
+ var import_utils15 = require("@typescript-eslint/utils");
1013
+ var createRule15 = import_utils15.ESLintUtils.RuleCreator(() => {
927
1014
  return `https://github.com/remotion-dev/remotion`;
928
1015
  });
929
1016
  var NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.";
930
1017
  var NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.";
931
1018
  var NoNativeAudioTag = "Use the <Audio /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.";
932
1019
  var NoNativeVideoTag = "Use the <Video /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.";
933
- var warn_native_media_tag_default = createRule14({
1020
+ var warn_native_media_tag_default = createRule15({
934
1021
  name: "warn-native-media-tag",
935
1022
  meta: {
936
1023
  type: "problem",
@@ -1033,7 +1120,8 @@ var rules = {
1033
1120
  "no-background-image": no_background_image_default,
1034
1121
  "non-pure-animation": non_pure_animation_default,
1035
1122
  "slow-css-property": slow_css_property_default,
1036
- "v4-config-import": v4_import_default
1123
+ "v4-config-import": v4_import_default,
1124
+ "no-object-fit-on-media-video": no_object_fit_on_media_video_default
1037
1125
  };
1038
1126
  var recommendedRuleConfig = {
1039
1127
  "@remotion/warn-native-media-tag": "error",
@@ -1048,7 +1136,8 @@ var recommendedRuleConfig = {
1048
1136
  "@remotion/staticfile-no-remote": "error",
1049
1137
  "@remotion/no-background-image": "error",
1050
1138
  "@remotion/non-pure-animation": "warn",
1051
- "@remotion/v4-config-import": "error"
1139
+ "@remotion/v4-config-import": "error",
1140
+ "@remotion/no-object-fit-on-media-video": "warn"
1052
1141
  };
1053
1142
  var configs = {
1054
1143
  recommended: {
@@ -327,11 +327,101 @@ var init_no_from_0 = __esm(() => {
327
327
  });
328
328
  });
329
329
 
330
- // src/rules/no-string-assets.ts
330
+ // src/rules/no-object-fit-on-media-video.ts
331
331
  import { ESLintUtils as ESLintUtils6 } from "@typescript-eslint/utils";
332
- var createRule6, NoStringAssets, no_string_assets_default;
333
- var init_no_string_assets = __esm(() => {
332
+ var createRule6, NoObjectFitInStyle, NoObjectFitInClassName, objectFitClassPattern, no_object_fit_on_media_video_default;
333
+ var init_no_object_fit_on_media_video = __esm(() => {
334
334
  createRule6 = ESLintUtils6.RuleCreator(() => {
335
+ return "https://remotion.dev/docs/media/video#objectfit";
336
+ });
337
+ NoObjectFitInStyle = [
338
+ "Passing `objectFit` via the `style` prop is not supported for `<Video>` from `@remotion/media`.",
339
+ "Use the `objectFit` prop directly instead.",
340
+ "See: https://remotion.dev/docs/media/video#objectfit"
341
+ ].join(`
342
+ `);
343
+ NoObjectFitInClassName = [
344
+ "Passing an `object-fit` CSS class via `className` is not supported for `<Video>` from `@remotion/media`.",
345
+ "Use the `objectFit` prop directly instead.",
346
+ "See: https://remotion.dev/docs/media/video#objectfit"
347
+ ].join(`
348
+ `);
349
+ objectFitClassPattern = /\bobject-(contain|cover|fill|none|scale-down)\b/;
350
+ no_object_fit_on_media_video_default = createRule6({
351
+ name: "no-object-fit-on-media-video",
352
+ meta: {
353
+ type: "problem",
354
+ docs: {
355
+ description: NoObjectFitInStyle,
356
+ recommended: "warn"
357
+ },
358
+ fixable: undefined,
359
+ schema: [],
360
+ messages: {
361
+ NoObjectFitInStyle,
362
+ NoObjectFitInClassName
363
+ }
364
+ },
365
+ defaultOptions: [],
366
+ create: (context) => {
367
+ return {
368
+ JSXOpeningElement: (node) => {
369
+ if (node.name.type !== "JSXIdentifier" || node.name.name !== "Video") {
370
+ return;
371
+ }
372
+ for (const attr of node.attributes) {
373
+ if (attr.type !== "JSXAttribute") {
374
+ continue;
375
+ }
376
+ if (attr.name.type === "JSXIdentifier" && attr.name.name === "style" && attr.value) {
377
+ if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "ObjectExpression") {
378
+ for (const prop of attr.value.expression.properties) {
379
+ if (prop.type !== "Property") {
380
+ continue;
381
+ }
382
+ let propertyName;
383
+ if (prop.key.type === "Identifier") {
384
+ propertyName = prop.key.name;
385
+ } else if (prop.key.type === "Literal" && typeof prop.key.value === "string") {
386
+ propertyName = prop.key.value;
387
+ }
388
+ if (propertyName === "objectFit" || propertyName === "object-fit") {
389
+ context.report({
390
+ messageId: "NoObjectFitInStyle",
391
+ node: prop
392
+ });
393
+ }
394
+ }
395
+ }
396
+ }
397
+ if (attr.name.type === "JSXIdentifier" && attr.name.name === "className" && attr.value) {
398
+ let classString;
399
+ if (attr.value.type === "Literal" && typeof attr.value.value === "string") {
400
+ classString = attr.value.value;
401
+ } else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "Literal" && typeof attr.value.expression.value === "string") {
402
+ classString = attr.value.expression.value;
403
+ } else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "TemplateLiteral") {
404
+ classString = attr.value.expression.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
405
+ }
406
+ if (classString && objectFitClassPattern.test(classString)) {
407
+ context.report({
408
+ messageId: "NoObjectFitInClassName",
409
+ node: attr
410
+ });
411
+ }
412
+ }
413
+ }
414
+ }
415
+ };
416
+ }
417
+ });
418
+ });
419
+
420
+ // src/rules/no-string-assets.ts
421
+ import { ESLintUtils as ESLintUtils7 } from "@typescript-eslint/utils";
422
+ var createRule7, NoStringAssets, no_string_assets_default;
423
+ var init_no_string_assets = __esm(() => {
424
+ createRule7 = ESLintUtils7.RuleCreator(() => {
335
425
  return `https://github.com/remotion-dev/remotion`;
336
426
  });
337
427
  NoStringAssets = [
@@ -339,7 +429,7 @@ var init_no_string_assets = __esm(() => {
339
429
  "See: https://www.remotion.dev/docs/assets"
340
430
  ].join(`
341
431
  `);
342
- no_string_assets_default = createRule6({
432
+ no_string_assets_default = createRule7({
343
433
  name: "no-string-assets",
344
434
  meta: {
345
435
  type: "problem",
@@ -405,7 +495,7 @@ var init_no_string_assets = __esm(() => {
405
495
  });
406
496
 
407
497
  // src/rules/non-pure-animation.ts
408
- import { ESLintUtils as ESLintUtils7 } from "@typescript-eslint/utils";
498
+ import { ESLintUtils as ESLintUtils8 } from "@typescript-eslint/utils";
409
499
  function findProblematicTailwindClass(classString) {
410
500
  for (const pattern of nonPureAnimationTailwindClasses) {
411
501
  const match = classString.match(pattern);
@@ -418,9 +508,9 @@ function findProblematicTailwindClass(classString) {
418
508
  }
419
509
  return null;
420
510
  }
421
- var createRule7, NonPureAnimation, nonPureAnimationProperties, nonPureAnimationPropertiesKebab, nonPureAnimationTailwindClasses, non_pure_animation_default;
511
+ var createRule8, NonPureAnimation, nonPureAnimationProperties, nonPureAnimationPropertiesKebab, nonPureAnimationTailwindClasses, non_pure_animation_default;
422
512
  var init_non_pure_animation = __esm(() => {
423
- createRule7 = ESLintUtils7.RuleCreator(() => {
513
+ createRule8 = ESLintUtils8.RuleCreator(() => {
424
514
  return "https://www.remotion.dev/docs/flickering";
425
515
  });
426
516
  NonPureAnimation = [
@@ -434,7 +524,7 @@ var init_non_pure_animation = __esm(() => {
434
524
  /\btransition-\w+\b/,
435
525
  /\btransition\b/
436
526
  ];
437
- non_pure_animation_default = createRule7({
527
+ non_pure_animation_default = createRule8({
438
528
  name: "non-pure-animation",
439
529
  meta: {
440
530
  type: "problem",
@@ -511,13 +601,13 @@ var init_non_pure_animation = __esm(() => {
511
601
  });
512
602
 
513
603
  // src/rules/slow-css-property.ts
514
- import { ESLintUtils as ESLintUtils8 } from "@typescript-eslint/utils";
604
+ import { ESLintUtils as ESLintUtils9 } from "@typescript-eslint/utils";
515
605
  function containsSlowTailwindClass(classString) {
516
606
  return slowTailwindClasses.some((pattern) => pattern.test(classString));
517
607
  }
518
- var createRule8, SlowCssProperty, slowCssProperties, slowCssPropertiesKebab, slowTailwindClasses, slow_css_property_default;
608
+ var createRule9, SlowCssProperty, slowCssProperties, slowCssPropertiesKebab, slowTailwindClasses, slow_css_property_default;
519
609
  var init_slow_css_property = __esm(() => {
520
- createRule8 = ESLintUtils8.RuleCreator(() => {
610
+ createRule9 = ESLintUtils9.RuleCreator(() => {
521
611
  return "https://remotion.dev/docs/gpu";
522
612
  });
523
613
  SlowCssProperty = [
@@ -541,7 +631,7 @@ var init_slow_css_property = __esm(() => {
541
631
  /\bsepia(?:-\d+)?\b/,
542
632
  /\btext-shadow-\w+\b/
543
633
  ];
544
- slow_css_property_default = createRule8({
634
+ slow_css_property_default = createRule9({
545
635
  name: "slow-css-property",
546
636
  meta: {
547
637
  type: "problem",
@@ -601,10 +691,10 @@ var init_slow_css_property = __esm(() => {
601
691
  });
602
692
 
603
693
  // src/rules/staticfile-no-relative.ts
604
- import { ESLintUtils as ESLintUtils9 } from "@typescript-eslint/utils";
605
- var createRule9, RelativePathStaticFile, AbsoluteStaticFile, PublicStaticFile, staticfile_no_relative_default;
694
+ import { ESLintUtils as ESLintUtils10 } from "@typescript-eslint/utils";
695
+ var createRule10, RelativePathStaticFile, AbsoluteStaticFile, PublicStaticFile, staticfile_no_relative_default;
606
696
  var init_staticfile_no_relative = __esm(() => {
607
- createRule9 = ESLintUtils9.RuleCreator(() => {
697
+ createRule10 = ESLintUtils10.RuleCreator(() => {
608
698
  return `https://remotion.dev/docs/staticfile-relative-paths`;
609
699
  });
610
700
  RelativePathStaticFile = [
@@ -620,7 +710,7 @@ var init_staticfile_no_relative = __esm(() => {
620
710
  "Do not prefix your assets with public/.",
621
711
  "See: https://remotion.dev/docs/staticfile-relative-paths"
622
712
  ].join("");
623
- staticfile_no_relative_default = createRule9({
713
+ staticfile_no_relative_default = createRule10({
624
714
  name: "staticfile-no-relative",
625
715
  meta: {
626
716
  type: "problem",
@@ -688,10 +778,10 @@ var init_staticfile_no_relative = __esm(() => {
688
778
  });
689
779
 
690
780
  // src/rules/staticfile-no-remote.ts
691
- import { ESLintUtils as ESLintUtils10 } from "@typescript-eslint/utils";
692
- var createRule10, RelativePathStaticFile2, staticfile_no_remote_default;
781
+ import { ESLintUtils as ESLintUtils11 } from "@typescript-eslint/utils";
782
+ var createRule11, RelativePathStaticFile2, staticfile_no_remote_default;
693
783
  var init_staticfile_no_remote = __esm(() => {
694
- createRule10 = ESLintUtils10.RuleCreator(() => {
784
+ createRule11 = ESLintUtils11.RuleCreator(() => {
695
785
  return `https://remotion.dev/docs/staticfile-remote-urls`;
696
786
  });
697
787
  RelativePathStaticFile2 = [
@@ -699,7 +789,7 @@ var init_staticfile_no_remote = __esm(() => {
699
789
  "See: https://remotion.dev/docs/staticfile-remote-urls"
700
790
  ].join(`
701
791
  `);
702
- staticfile_no_remote_default = createRule10({
792
+ staticfile_no_remote_default = createRule11({
703
793
  name: "staticfile-no-remote",
704
794
  meta: {
705
795
  type: "problem",
@@ -753,10 +843,10 @@ var init_staticfile_no_remote = __esm(() => {
753
843
  });
754
844
 
755
845
  // src/rules/use-gif-component.ts
756
- import { ESLintUtils as ESLintUtils11 } from "@typescript-eslint/utils";
757
- var createRule11, UseGifComponent, use_gif_component_default;
846
+ import { ESLintUtils as ESLintUtils12 } from "@typescript-eslint/utils";
847
+ var createRule12, UseGifComponent, use_gif_component_default;
758
848
  var init_use_gif_component = __esm(() => {
759
- createRule11 = ESLintUtils11.RuleCreator(() => {
849
+ createRule12 = ESLintUtils12.RuleCreator(() => {
760
850
  return `https://github.com/remotion-dev/remotion`;
761
851
  });
762
852
  UseGifComponent = [
@@ -765,7 +855,7 @@ var init_use_gif_component = __esm(() => {
765
855
  "Ignore this message if this is a non-animated GIF."
766
856
  ].join(`
767
857
  `);
768
- use_gif_component_default = createRule11({
858
+ use_gif_component_default = createRule12({
769
859
  name: "use-gif-component",
770
860
  meta: {
771
861
  type: "problem",
@@ -842,13 +932,13 @@ var init_use_gif_component = __esm(() => {
842
932
  });
843
933
 
844
934
  // src/rules/v4-import.ts
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;
935
+ import { ESLintUtils as ESLintUtils13 } from "@typescript-eslint/utils";
936
+ var createRule13, ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'", rule, v4_import_default;
847
937
  var init_v4_import = __esm(() => {
848
- createRule12 = ESLintUtils12.RuleCreator(() => {
938
+ createRule13 = ESLintUtils13.RuleCreator(() => {
849
939
  return `https://www.remotion.dev/docs/4-0-migration`;
850
940
  });
851
- rule = createRule12({
941
+ rule = createRule13({
852
942
  name: "v4-config-import",
853
943
  meta: {
854
944
  type: "problem",
@@ -884,13 +974,13 @@ var init_v4_import = __esm(() => {
884
974
  });
885
975
 
886
976
  // src/rules/volume-callback.ts
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;
977
+ import { ESLintUtils as ESLintUtils14 } from "@typescript-eslint/utils";
978
+ var createRule14, VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume", volume_callback_default;
889
979
  var init_volume_callback = __esm(() => {
890
- createRule13 = ESLintUtils13.RuleCreator(() => {
980
+ createRule14 = ESLintUtils14.RuleCreator(() => {
891
981
  return `https://github.com/remotion-dev/remotion`;
892
982
  });
893
- volume_callback_default = createRule13({
983
+ volume_callback_default = createRule14({
894
984
  name: "volume-callback",
895
985
  meta: {
896
986
  type: "problem",
@@ -959,13 +1049,13 @@ var init_volume_callback = __esm(() => {
959
1049
  });
960
1050
 
961
1051
  // src/rules/warn-native-media-tag.ts
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/media' package, because it will synchronize with the Remotion timeline.", NoNativeVideoTag = "Use the <Video /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.", warn_native_media_tag_default;
1052
+ import { ESLintUtils as ESLintUtils15 } from "@typescript-eslint/utils";
1053
+ var createRule15, 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/media' package, because it will synchronize with the Remotion timeline.", NoNativeVideoTag = "Use the <Video /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.", warn_native_media_tag_default;
964
1054
  var init_warn_native_media_tag = __esm(() => {
965
- createRule14 = ESLintUtils14.RuleCreator(() => {
1055
+ createRule15 = ESLintUtils15.RuleCreator(() => {
966
1056
  return `https://github.com/remotion-dev/remotion`;
967
1057
  });
968
- warn_native_media_tag_default = createRule14({
1058
+ warn_native_media_tag_default = createRule15({
969
1059
  name: "warn-native-media-tag",
970
1060
  meta: {
971
1061
  type: "problem",
@@ -1061,6 +1151,7 @@ var require_src = __commonJS((exports, module) => {
1061
1151
  init_no_background_image();
1062
1152
  init_no_duration_frames_infinity();
1063
1153
  init_no_from_0();
1154
+ init_no_object_fit_on_media_video();
1064
1155
  init_no_string_assets();
1065
1156
  init_non_pure_animation();
1066
1157
  init_slow_css_property();
@@ -1084,7 +1175,8 @@ var require_src = __commonJS((exports, module) => {
1084
1175
  "no-background-image": no_background_image_default,
1085
1176
  "non-pure-animation": non_pure_animation_default,
1086
1177
  "slow-css-property": slow_css_property_default,
1087
- "v4-config-import": v4_import_default
1178
+ "v4-config-import": v4_import_default,
1179
+ "no-object-fit-on-media-video": no_object_fit_on_media_video_default
1088
1180
  };
1089
1181
  var recommendedRuleConfig = {
1090
1182
  "@remotion/warn-native-media-tag": "error",
@@ -1099,7 +1191,8 @@ var require_src = __commonJS((exports, module) => {
1099
1191
  "@remotion/staticfile-no-remote": "error",
1100
1192
  "@remotion/no-background-image": "error",
1101
1193
  "@remotion/non-pure-animation": "warn",
1102
- "@remotion/v4-config-import": "error"
1194
+ "@remotion/v4-config-import": "error",
1195
+ "@remotion/no-object-fit-on-media-video": "warn"
1103
1196
  };
1104
1197
  var configs = {
1105
1198
  recommended: {
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ declare const _default: {
15
15
  readonly '@remotion/no-background-image': "error";
16
16
  readonly '@remotion/non-pure-animation': "warn";
17
17
  readonly '@remotion/v4-config-import': "error";
18
+ readonly '@remotion/no-object-fit-on-media-video': "warn";
18
19
  };
19
20
  readonly plugins: readonly ["@remotion"];
20
21
  };
@@ -34,6 +35,7 @@ declare const _default: {
34
35
  'non-pure-animation': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NonPureAnimation", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
35
36
  'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
36
37
  'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
38
+ 'no-object-fit-on-media-video': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NoObjectFitInClassName" | "NoObjectFitInStyle", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
37
39
  };
38
40
  flatPlugin: {
39
41
  rules: {
@@ -50,6 +52,7 @@ declare const _default: {
50
52
  readonly '@remotion/no-background-image': "error";
51
53
  readonly '@remotion/non-pure-animation': "warn";
52
54
  readonly '@remotion/v4-config-import': "error";
55
+ readonly '@remotion/no-object-fit-on-media-video': "warn";
53
56
  };
54
57
  plugins: {
55
58
  '@remotion': {
@@ -68,6 +71,7 @@ declare const _default: {
68
71
  'non-pure-animation': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NonPureAnimation", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
69
72
  'slow-css-property': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"SlowCssProperty", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
70
73
  'v4-config-import': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
74
+ 'no-object-fit-on-media-video': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"NoObjectFitInClassName" | "NoObjectFitInStyle", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
71
75
  };
72
76
  };
73
77
  };
@@ -0,0 +1,3 @@
1
+ type MessageIds = 'NoObjectFitInStyle' | 'NoObjectFitInClassName';
2
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<MessageIds, [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
3
+ 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.440",
6
+ "version": "4.0.442",
7
7
  "description": "Rules for writing Remotion code",
8
8
  "scripts": {
9
9
  "test": "node src/tests/execute.mjs",