@remotion/eslint-config-flat 4.0.441 → 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/esm/index.mjs +123 -28
- package/package.json +3 -3
package/dist/esm/index.mjs
CHANGED
|
@@ -46262,6 +46262,7 @@ var import_utils11 = __toESM(require_dist4(), 1);
|
|
|
46262
46262
|
var import_utils12 = __toESM(require_dist4(), 1);
|
|
46263
46263
|
var import_utils13 = __toESM(require_dist4(), 1);
|
|
46264
46264
|
var import_utils14 = __toESM(require_dist4(), 1);
|
|
46265
|
+
var import_utils15 = __toESM(require_dist4(), 1);
|
|
46265
46266
|
var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
46266
46267
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46267
46268
|
var createRule;
|
|
@@ -46586,10 +46587,101 @@ var init_no_from_0 = __esm(() => {
|
|
|
46586
46587
|
});
|
|
46587
46588
|
});
|
|
46588
46589
|
var createRule6;
|
|
46590
|
+
var NoObjectFitInStyle;
|
|
46591
|
+
var NoObjectFitInClassName;
|
|
46592
|
+
var objectFitClassPattern;
|
|
46593
|
+
var no_object_fit_on_media_video_default;
|
|
46594
|
+
var init_no_object_fit_on_media_video = __esm(() => {
|
|
46595
|
+
createRule6 = import_utils6.ESLintUtils.RuleCreator(() => {
|
|
46596
|
+
return "https://remotion.dev/docs/media/video#objectfit";
|
|
46597
|
+
});
|
|
46598
|
+
NoObjectFitInStyle = [
|
|
46599
|
+
"Passing `objectFit` via the `style` prop is not supported for `<Video>` from `@remotion/media`.",
|
|
46600
|
+
"Use the `objectFit` prop directly instead.",
|
|
46601
|
+
"See: https://remotion.dev/docs/media/video#objectfit"
|
|
46602
|
+
].join(`
|
|
46603
|
+
`);
|
|
46604
|
+
NoObjectFitInClassName = [
|
|
46605
|
+
"Passing an `object-fit` CSS class via `className` is not supported for `<Video>` from `@remotion/media`.",
|
|
46606
|
+
"Use the `objectFit` prop directly instead.",
|
|
46607
|
+
"See: https://remotion.dev/docs/media/video#objectfit"
|
|
46608
|
+
].join(`
|
|
46609
|
+
`);
|
|
46610
|
+
objectFitClassPattern = /\bobject-(contain|cover|fill|none|scale-down)\b/;
|
|
46611
|
+
no_object_fit_on_media_video_default = createRule6({
|
|
46612
|
+
name: "no-object-fit-on-media-video",
|
|
46613
|
+
meta: {
|
|
46614
|
+
type: "problem",
|
|
46615
|
+
docs: {
|
|
46616
|
+
description: NoObjectFitInStyle,
|
|
46617
|
+
recommended: "warn"
|
|
46618
|
+
},
|
|
46619
|
+
fixable: undefined,
|
|
46620
|
+
schema: [],
|
|
46621
|
+
messages: {
|
|
46622
|
+
NoObjectFitInStyle,
|
|
46623
|
+
NoObjectFitInClassName
|
|
46624
|
+
}
|
|
46625
|
+
},
|
|
46626
|
+
defaultOptions: [],
|
|
46627
|
+
create: (context) => {
|
|
46628
|
+
return {
|
|
46629
|
+
JSXOpeningElement: (node) => {
|
|
46630
|
+
if (node.name.type !== "JSXIdentifier" || node.name.name !== "Video") {
|
|
46631
|
+
return;
|
|
46632
|
+
}
|
|
46633
|
+
for (const attr of node.attributes) {
|
|
46634
|
+
if (attr.type !== "JSXAttribute") {
|
|
46635
|
+
continue;
|
|
46636
|
+
}
|
|
46637
|
+
if (attr.name.type === "JSXIdentifier" && attr.name.name === "style" && attr.value) {
|
|
46638
|
+
if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "ObjectExpression") {
|
|
46639
|
+
for (const prop of attr.value.expression.properties) {
|
|
46640
|
+
if (prop.type !== "Property") {
|
|
46641
|
+
continue;
|
|
46642
|
+
}
|
|
46643
|
+
let propertyName;
|
|
46644
|
+
if (prop.key.type === "Identifier") {
|
|
46645
|
+
propertyName = prop.key.name;
|
|
46646
|
+
} else if (prop.key.type === "Literal" && typeof prop.key.value === "string") {
|
|
46647
|
+
propertyName = prop.key.value;
|
|
46648
|
+
}
|
|
46649
|
+
if (propertyName === "objectFit" || propertyName === "object-fit") {
|
|
46650
|
+
context.report({
|
|
46651
|
+
messageId: "NoObjectFitInStyle",
|
|
46652
|
+
node: prop
|
|
46653
|
+
});
|
|
46654
|
+
}
|
|
46655
|
+
}
|
|
46656
|
+
}
|
|
46657
|
+
}
|
|
46658
|
+
if (attr.name.type === "JSXIdentifier" && attr.name.name === "className" && attr.value) {
|
|
46659
|
+
let classString;
|
|
46660
|
+
if (attr.value.type === "Literal" && typeof attr.value.value === "string") {
|
|
46661
|
+
classString = attr.value.value;
|
|
46662
|
+
} else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "Literal" && typeof attr.value.expression.value === "string") {
|
|
46663
|
+
classString = attr.value.expression.value;
|
|
46664
|
+
} else if (attr.value.type === "JSXExpressionContainer" && attr.value.expression.type === "TemplateLiteral") {
|
|
46665
|
+
classString = attr.value.expression.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
|
|
46666
|
+
}
|
|
46667
|
+
if (classString && objectFitClassPattern.test(classString)) {
|
|
46668
|
+
context.report({
|
|
46669
|
+
messageId: "NoObjectFitInClassName",
|
|
46670
|
+
node: attr
|
|
46671
|
+
});
|
|
46672
|
+
}
|
|
46673
|
+
}
|
|
46674
|
+
}
|
|
46675
|
+
}
|
|
46676
|
+
};
|
|
46677
|
+
}
|
|
46678
|
+
});
|
|
46679
|
+
});
|
|
46680
|
+
var createRule7;
|
|
46589
46681
|
var NoStringAssets;
|
|
46590
46682
|
var no_string_assets_default;
|
|
46591
46683
|
var init_no_string_assets = __esm(() => {
|
|
46592
|
-
|
|
46684
|
+
createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
|
|
46593
46685
|
return `https://github.com/remotion-dev/remotion`;
|
|
46594
46686
|
});
|
|
46595
46687
|
NoStringAssets = [
|
|
@@ -46597,7 +46689,7 @@ var init_no_string_assets = __esm(() => {
|
|
|
46597
46689
|
"See: https://www.remotion.dev/docs/assets"
|
|
46598
46690
|
].join(`
|
|
46599
46691
|
`);
|
|
46600
|
-
no_string_assets_default =
|
|
46692
|
+
no_string_assets_default = createRule7({
|
|
46601
46693
|
name: "no-string-assets",
|
|
46602
46694
|
meta: {
|
|
46603
46695
|
type: "problem",
|
|
@@ -46673,14 +46765,14 @@ function findProblematicTailwindClass(classString) {
|
|
|
46673
46765
|
}
|
|
46674
46766
|
return null;
|
|
46675
46767
|
}
|
|
46676
|
-
var
|
|
46768
|
+
var createRule8;
|
|
46677
46769
|
var NonPureAnimation;
|
|
46678
46770
|
var nonPureAnimationProperties;
|
|
46679
46771
|
var nonPureAnimationPropertiesKebab;
|
|
46680
46772
|
var nonPureAnimationTailwindClasses;
|
|
46681
46773
|
var non_pure_animation_default;
|
|
46682
46774
|
var init_non_pure_animation = __esm(() => {
|
|
46683
|
-
|
|
46775
|
+
createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
|
|
46684
46776
|
return "https://www.remotion.dev/docs/flickering";
|
|
46685
46777
|
});
|
|
46686
46778
|
NonPureAnimation = [
|
|
@@ -46694,7 +46786,7 @@ var init_non_pure_animation = __esm(() => {
|
|
|
46694
46786
|
/\btransition-\w+\b/,
|
|
46695
46787
|
/\btransition\b/
|
|
46696
46788
|
];
|
|
46697
|
-
non_pure_animation_default =
|
|
46789
|
+
non_pure_animation_default = createRule8({
|
|
46698
46790
|
name: "non-pure-animation",
|
|
46699
46791
|
meta: {
|
|
46700
46792
|
type: "problem",
|
|
@@ -46772,14 +46864,14 @@ var init_non_pure_animation = __esm(() => {
|
|
|
46772
46864
|
function containsSlowTailwindClass(classString) {
|
|
46773
46865
|
return slowTailwindClasses.some((pattern) => pattern.test(classString));
|
|
46774
46866
|
}
|
|
46775
|
-
var
|
|
46867
|
+
var createRule9;
|
|
46776
46868
|
var SlowCssProperty;
|
|
46777
46869
|
var slowCssProperties;
|
|
46778
46870
|
var slowCssPropertiesKebab;
|
|
46779
46871
|
var slowTailwindClasses;
|
|
46780
46872
|
var slow_css_property_default;
|
|
46781
46873
|
var init_slow_css_property = __esm(() => {
|
|
46782
|
-
|
|
46874
|
+
createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
|
|
46783
46875
|
return "https://remotion.dev/docs/gpu";
|
|
46784
46876
|
});
|
|
46785
46877
|
SlowCssProperty = [
|
|
@@ -46803,7 +46895,7 @@ var init_slow_css_property = __esm(() => {
|
|
|
46803
46895
|
/\bsepia(?:-\d+)?\b/,
|
|
46804
46896
|
/\btext-shadow-\w+\b/
|
|
46805
46897
|
];
|
|
46806
|
-
slow_css_property_default =
|
|
46898
|
+
slow_css_property_default = createRule9({
|
|
46807
46899
|
name: "slow-css-property",
|
|
46808
46900
|
meta: {
|
|
46809
46901
|
type: "problem",
|
|
@@ -46861,13 +46953,13 @@ var init_slow_css_property = __esm(() => {
|
|
|
46861
46953
|
}
|
|
46862
46954
|
});
|
|
46863
46955
|
});
|
|
46864
|
-
var
|
|
46956
|
+
var createRule10;
|
|
46865
46957
|
var RelativePathStaticFile;
|
|
46866
46958
|
var AbsoluteStaticFile;
|
|
46867
46959
|
var PublicStaticFile;
|
|
46868
46960
|
var staticfile_no_relative_default;
|
|
46869
46961
|
var init_staticfile_no_relative = __esm(() => {
|
|
46870
|
-
|
|
46962
|
+
createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
|
|
46871
46963
|
return `https://remotion.dev/docs/staticfile-relative-paths`;
|
|
46872
46964
|
});
|
|
46873
46965
|
RelativePathStaticFile = [
|
|
@@ -46883,7 +46975,7 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
46883
46975
|
"Do not prefix your assets with public/.",
|
|
46884
46976
|
"See: https://remotion.dev/docs/staticfile-relative-paths"
|
|
46885
46977
|
].join("");
|
|
46886
|
-
staticfile_no_relative_default =
|
|
46978
|
+
staticfile_no_relative_default = createRule10({
|
|
46887
46979
|
name: "staticfile-no-relative",
|
|
46888
46980
|
meta: {
|
|
46889
46981
|
type: "problem",
|
|
@@ -46949,11 +47041,11 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
46949
47041
|
}
|
|
46950
47042
|
});
|
|
46951
47043
|
});
|
|
46952
|
-
var
|
|
47044
|
+
var createRule11;
|
|
46953
47045
|
var RelativePathStaticFile2;
|
|
46954
47046
|
var staticfile_no_remote_default;
|
|
46955
47047
|
var init_staticfile_no_remote = __esm(() => {
|
|
46956
|
-
|
|
47048
|
+
createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
|
|
46957
47049
|
return `https://remotion.dev/docs/staticfile-remote-urls`;
|
|
46958
47050
|
});
|
|
46959
47051
|
RelativePathStaticFile2 = [
|
|
@@ -46961,7 +47053,7 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
46961
47053
|
"See: https://remotion.dev/docs/staticfile-remote-urls"
|
|
46962
47054
|
].join(`
|
|
46963
47055
|
`);
|
|
46964
|
-
staticfile_no_remote_default =
|
|
47056
|
+
staticfile_no_remote_default = createRule11({
|
|
46965
47057
|
name: "staticfile-no-remote",
|
|
46966
47058
|
meta: {
|
|
46967
47059
|
type: "problem",
|
|
@@ -47013,11 +47105,11 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
47013
47105
|
}
|
|
47014
47106
|
});
|
|
47015
47107
|
});
|
|
47016
|
-
var
|
|
47108
|
+
var createRule12;
|
|
47017
47109
|
var UseGifComponent;
|
|
47018
47110
|
var use_gif_component_default;
|
|
47019
47111
|
var init_use_gif_component = __esm(() => {
|
|
47020
|
-
|
|
47112
|
+
createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
|
|
47021
47113
|
return `https://github.com/remotion-dev/remotion`;
|
|
47022
47114
|
});
|
|
47023
47115
|
UseGifComponent = [
|
|
@@ -47026,7 +47118,7 @@ var init_use_gif_component = __esm(() => {
|
|
|
47026
47118
|
"Ignore this message if this is a non-animated GIF."
|
|
47027
47119
|
].join(`
|
|
47028
47120
|
`);
|
|
47029
|
-
use_gif_component_default =
|
|
47121
|
+
use_gif_component_default = createRule12({
|
|
47030
47122
|
name: "use-gif-component",
|
|
47031
47123
|
meta: {
|
|
47032
47124
|
type: "problem",
|
|
@@ -47101,15 +47193,15 @@ var init_use_gif_component = __esm(() => {
|
|
|
47101
47193
|
}
|
|
47102
47194
|
});
|
|
47103
47195
|
});
|
|
47104
|
-
var
|
|
47196
|
+
var createRule13;
|
|
47105
47197
|
var ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
|
|
47106
47198
|
var rule;
|
|
47107
47199
|
var v4_import_default;
|
|
47108
47200
|
var init_v4_import = __esm(() => {
|
|
47109
|
-
|
|
47201
|
+
createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
|
|
47110
47202
|
return `https://www.remotion.dev/docs/4-0-migration`;
|
|
47111
47203
|
});
|
|
47112
|
-
rule =
|
|
47204
|
+
rule = createRule13({
|
|
47113
47205
|
name: "v4-config-import",
|
|
47114
47206
|
meta: {
|
|
47115
47207
|
type: "problem",
|
|
@@ -47143,14 +47235,14 @@ var init_v4_import = __esm(() => {
|
|
|
47143
47235
|
});
|
|
47144
47236
|
v4_import_default = rule;
|
|
47145
47237
|
});
|
|
47146
|
-
var
|
|
47238
|
+
var createRule14;
|
|
47147
47239
|
var VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume";
|
|
47148
47240
|
var volume_callback_default;
|
|
47149
47241
|
var init_volume_callback = __esm(() => {
|
|
47150
|
-
|
|
47242
|
+
createRule14 = import_utils14.ESLintUtils.RuleCreator(() => {
|
|
47151
47243
|
return `https://github.com/remotion-dev/remotion`;
|
|
47152
47244
|
});
|
|
47153
|
-
volume_callback_default =
|
|
47245
|
+
volume_callback_default = createRule14({
|
|
47154
47246
|
name: "volume-callback",
|
|
47155
47247
|
meta: {
|
|
47156
47248
|
type: "problem",
|
|
@@ -47217,17 +47309,17 @@ var init_volume_callback = __esm(() => {
|
|
|
47217
47309
|
}
|
|
47218
47310
|
});
|
|
47219
47311
|
});
|
|
47220
|
-
var
|
|
47312
|
+
var createRule15;
|
|
47221
47313
|
var NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.";
|
|
47222
47314
|
var NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.";
|
|
47223
47315
|
var NoNativeAudioTag = "Use the <Audio /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.";
|
|
47224
47316
|
var NoNativeVideoTag = "Use the <Video /> tag from '@remotion/media' package, because it will synchronize with the Remotion timeline.";
|
|
47225
47317
|
var warn_native_media_tag_default;
|
|
47226
47318
|
var init_warn_native_media_tag = __esm(() => {
|
|
47227
|
-
|
|
47319
|
+
createRule15 = import_utils15.ESLintUtils.RuleCreator(() => {
|
|
47228
47320
|
return `https://github.com/remotion-dev/remotion`;
|
|
47229
47321
|
});
|
|
47230
|
-
warn_native_media_tag_default =
|
|
47322
|
+
warn_native_media_tag_default = createRule15({
|
|
47231
47323
|
name: "warn-native-media-tag",
|
|
47232
47324
|
meta: {
|
|
47233
47325
|
type: "problem",
|
|
@@ -47321,6 +47413,7 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47321
47413
|
init_no_background_image();
|
|
47322
47414
|
init_no_duration_frames_infinity();
|
|
47323
47415
|
init_no_from_0();
|
|
47416
|
+
init_no_object_fit_on_media_video();
|
|
47324
47417
|
init_no_string_assets();
|
|
47325
47418
|
init_non_pure_animation();
|
|
47326
47419
|
init_slow_css_property();
|
|
@@ -47344,7 +47437,8 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47344
47437
|
"no-background-image": no_background_image_default,
|
|
47345
47438
|
"non-pure-animation": non_pure_animation_default,
|
|
47346
47439
|
"slow-css-property": slow_css_property_default,
|
|
47347
|
-
"v4-config-import": v4_import_default
|
|
47440
|
+
"v4-config-import": v4_import_default,
|
|
47441
|
+
"no-object-fit-on-media-video": no_object_fit_on_media_video_default
|
|
47348
47442
|
};
|
|
47349
47443
|
var recommendedRuleConfig = {
|
|
47350
47444
|
"@remotion/warn-native-media-tag": "error",
|
|
@@ -47359,7 +47453,8 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47359
47453
|
"@remotion/staticfile-no-remote": "error",
|
|
47360
47454
|
"@remotion/no-background-image": "error",
|
|
47361
47455
|
"@remotion/non-pure-animation": "warn",
|
|
47362
|
-
"@remotion/v4-config-import": "error"
|
|
47456
|
+
"@remotion/v4-config-import": "error",
|
|
47457
|
+
"@remotion/no-object-fit-on-media-video": "warn"
|
|
47363
47458
|
};
|
|
47364
47459
|
var configs = {
|
|
47365
47460
|
recommended: {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/eslint-config-flat"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/eslint-config-flat",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.442",
|
|
7
7
|
"description": "Default configuration for Remotion templates (ESLint >= 9)",
|
|
8
8
|
"main": "dist/esm/index.mjs",
|
|
9
9
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"eslint": ">=9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@remotion/eslint-plugin": "4.0.
|
|
31
|
+
"@remotion/eslint-plugin": "4.0.442",
|
|
32
32
|
"@eslint/js": "9.19.0",
|
|
33
33
|
"eslint-plugin-react": "7.37.4",
|
|
34
34
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
35
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
35
|
+
"@remotion/eslint-config-internal": "4.0.442",
|
|
36
36
|
"eslint": "9.19.0",
|
|
37
37
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
38
38
|
},
|