@remotion/eslint-config-flat 4.0.317 → 4.0.319
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 +119 -17
- package/package.json +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -46260,6 +46260,7 @@ var import_utils9 = __toESM(require_dist4(), 1);
|
|
|
46260
46260
|
var import_utils10 = __toESM(require_dist4(), 1);
|
|
46261
46261
|
var import_utils11 = __toESM(require_dist4(), 1);
|
|
46262
46262
|
var import_utils12 = __toESM(require_dist4(), 1);
|
|
46263
|
+
var import_utils13 = __toESM(require_dist4(), 1);
|
|
46263
46264
|
var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
46264
46265
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46265
46266
|
var createRule;
|
|
@@ -46659,13 +46660,105 @@ var init_no_string_assets = __esm(() => {
|
|
|
46659
46660
|
}
|
|
46660
46661
|
});
|
|
46661
46662
|
});
|
|
46663
|
+
function containsSlowTailwindClass(classString) {
|
|
46664
|
+
return slowTailwindClasses.some((pattern) => pattern.test(classString));
|
|
46665
|
+
}
|
|
46662
46666
|
var createRule7;
|
|
46667
|
+
var SlowCssProperty;
|
|
46668
|
+
var slowCssProperties;
|
|
46669
|
+
var slowCssPropertiesKebab;
|
|
46670
|
+
var slowTailwindClasses;
|
|
46671
|
+
var slow_css_property_default;
|
|
46672
|
+
var init_slow_css_property = __esm(() => {
|
|
46673
|
+
createRule7 = import_utils7.ESLintUtils.RuleCreator(() => {
|
|
46674
|
+
return "https://remotion.dev/docs/gpu";
|
|
46675
|
+
});
|
|
46676
|
+
SlowCssProperty = [
|
|
46677
|
+
"This GPU effect may slow down the render on machines which don't have a GPU.",
|
|
46678
|
+
"See: https://remotion.dev/docs/gpu"
|
|
46679
|
+
].join(`
|
|
46680
|
+
`);
|
|
46681
|
+
slowCssProperties = new Set(["boxShadow", "textShadow", "filter"]);
|
|
46682
|
+
slowCssPropertiesKebab = new Set(["box-shadow", "text-shadow", "filter"]);
|
|
46683
|
+
slowTailwindClasses = [
|
|
46684
|
+
/\bshadow-(?:sm|md|lg|xl|2xl|inner|none|\w+)\b/,
|
|
46685
|
+
/\bshadow-\w+(?:\/\d+)?\b/,
|
|
46686
|
+
/\bblur-(?:none|sm|md|lg|xl|2xl|3xl|\w+)\b/,
|
|
46687
|
+
/\bbrightness-\d+\b/,
|
|
46688
|
+
/\bcontrast-\d+\b/,
|
|
46689
|
+
/\bdrop-shadow-(?:sm|md|lg|xl|2xl|none|\w+)\b/,
|
|
46690
|
+
/\bgrayscale(?:-\d+)?\b/,
|
|
46691
|
+
/\bhue-rotate-\d+\b/,
|
|
46692
|
+
/\binvert(?:-\d+)?\b/,
|
|
46693
|
+
/\bsaturate-\d+\b/,
|
|
46694
|
+
/\bsepia(?:-\d+)?\b/,
|
|
46695
|
+
/\btext-shadow-\w+\b/
|
|
46696
|
+
];
|
|
46697
|
+
slow_css_property_default = createRule7({
|
|
46698
|
+
name: "slow-css-property",
|
|
46699
|
+
meta: {
|
|
46700
|
+
type: "problem",
|
|
46701
|
+
docs: {
|
|
46702
|
+
description: SlowCssProperty,
|
|
46703
|
+
recommended: "warn"
|
|
46704
|
+
},
|
|
46705
|
+
fixable: undefined,
|
|
46706
|
+
schema: [],
|
|
46707
|
+
messages: {
|
|
46708
|
+
SlowCssProperty
|
|
46709
|
+
}
|
|
46710
|
+
},
|
|
46711
|
+
defaultOptions: [],
|
|
46712
|
+
create: (context) => {
|
|
46713
|
+
return {
|
|
46714
|
+
Property: (node) => {
|
|
46715
|
+
let propertyName;
|
|
46716
|
+
if (node.key.type === "Identifier") {
|
|
46717
|
+
propertyName = node.key.name;
|
|
46718
|
+
} else if (node.key.type === "Literal" && typeof node.key.value === "string") {
|
|
46719
|
+
propertyName = node.key.value;
|
|
46720
|
+
}
|
|
46721
|
+
if (!propertyName) {
|
|
46722
|
+
return;
|
|
46723
|
+
}
|
|
46724
|
+
const isSlowProperty = slowCssProperties.has(propertyName) || slowCssPropertiesKebab.has(propertyName);
|
|
46725
|
+
if (isSlowProperty) {
|
|
46726
|
+
context.report({
|
|
46727
|
+
messageId: "SlowCssProperty",
|
|
46728
|
+
node
|
|
46729
|
+
});
|
|
46730
|
+
}
|
|
46731
|
+
},
|
|
46732
|
+
JSXAttribute: (node) => {
|
|
46733
|
+
if (node.name.type === "JSXIdentifier" && node.name.name === "className" && node.value) {
|
|
46734
|
+
let classString;
|
|
46735
|
+
if (node.value.type === "Literal" && typeof node.value.value === "string") {
|
|
46736
|
+
classString = node.value.value;
|
|
46737
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "Literal" && typeof node.value.expression.value === "string") {
|
|
46738
|
+
classString = node.value.expression.value;
|
|
46739
|
+
} else if (node.value.type === "JSXExpressionContainer" && node.value.expression.type === "TemplateLiteral") {
|
|
46740
|
+
const templateLiteral = node.value.expression;
|
|
46741
|
+
classString = templateLiteral.quasis.map((q) => q.value.cooked || q.value.raw).join(" ");
|
|
46742
|
+
}
|
|
46743
|
+
if (classString && containsSlowTailwindClass(classString)) {
|
|
46744
|
+
context.report({
|
|
46745
|
+
messageId: "SlowCssProperty",
|
|
46746
|
+
node
|
|
46747
|
+
});
|
|
46748
|
+
}
|
|
46749
|
+
}
|
|
46750
|
+
}
|
|
46751
|
+
};
|
|
46752
|
+
}
|
|
46753
|
+
});
|
|
46754
|
+
});
|
|
46755
|
+
var createRule8;
|
|
46663
46756
|
var RelativePathStaticFile;
|
|
46664
46757
|
var AbsoluteStaticFile;
|
|
46665
46758
|
var PublicStaticFile;
|
|
46666
46759
|
var staticfile_no_relative_default;
|
|
46667
46760
|
var init_staticfile_no_relative = __esm(() => {
|
|
46668
|
-
|
|
46761
|
+
createRule8 = import_utils8.ESLintUtils.RuleCreator(() => {
|
|
46669
46762
|
return `https://remotion.dev/docs/staticfile-relative-paths`;
|
|
46670
46763
|
});
|
|
46671
46764
|
RelativePathStaticFile = [
|
|
@@ -46681,7 +46774,7 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
46681
46774
|
"Do not prefix your assets with public/.",
|
|
46682
46775
|
"See: https://remotion.dev/docs/staticfile-relative-paths"
|
|
46683
46776
|
].join("");
|
|
46684
|
-
staticfile_no_relative_default =
|
|
46777
|
+
staticfile_no_relative_default = createRule8({
|
|
46685
46778
|
name: "staticfile-no-relative",
|
|
46686
46779
|
meta: {
|
|
46687
46780
|
type: "problem",
|
|
@@ -46747,11 +46840,11 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
46747
46840
|
}
|
|
46748
46841
|
});
|
|
46749
46842
|
});
|
|
46750
|
-
var
|
|
46843
|
+
var createRule9;
|
|
46751
46844
|
var RelativePathStaticFile2;
|
|
46752
46845
|
var staticfile_no_remote_default;
|
|
46753
46846
|
var init_staticfile_no_remote = __esm(() => {
|
|
46754
|
-
|
|
46847
|
+
createRule9 = import_utils9.ESLintUtils.RuleCreator(() => {
|
|
46755
46848
|
return `https://remotion.dev/docs/staticfile-remote-urls`;
|
|
46756
46849
|
});
|
|
46757
46850
|
RelativePathStaticFile2 = [
|
|
@@ -46759,7 +46852,7 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
46759
46852
|
"See: https://remotion.dev/docs/staticfile-remote-urls"
|
|
46760
46853
|
].join(`
|
|
46761
46854
|
`);
|
|
46762
|
-
staticfile_no_remote_default =
|
|
46855
|
+
staticfile_no_remote_default = createRule9({
|
|
46763
46856
|
name: "staticfile-no-remote",
|
|
46764
46857
|
meta: {
|
|
46765
46858
|
type: "problem",
|
|
@@ -46811,11 +46904,11 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
46811
46904
|
}
|
|
46812
46905
|
});
|
|
46813
46906
|
});
|
|
46814
|
-
var
|
|
46907
|
+
var createRule10;
|
|
46815
46908
|
var UseGifComponent;
|
|
46816
46909
|
var use_gif_component_default;
|
|
46817
46910
|
var init_use_gif_component = __esm(() => {
|
|
46818
|
-
|
|
46911
|
+
createRule10 = import_utils10.ESLintUtils.RuleCreator(() => {
|
|
46819
46912
|
return `https://github.com/remotion-dev/remotion`;
|
|
46820
46913
|
});
|
|
46821
46914
|
UseGifComponent = [
|
|
@@ -46824,7 +46917,7 @@ var init_use_gif_component = __esm(() => {
|
|
|
46824
46917
|
"Ignore this message if this is a non-animated GIF."
|
|
46825
46918
|
].join(`
|
|
46826
46919
|
`);
|
|
46827
|
-
use_gif_component_default =
|
|
46920
|
+
use_gif_component_default = createRule10({
|
|
46828
46921
|
name: "use-gif-component",
|
|
46829
46922
|
meta: {
|
|
46830
46923
|
type: "problem",
|
|
@@ -46899,15 +46992,15 @@ var init_use_gif_component = __esm(() => {
|
|
|
46899
46992
|
}
|
|
46900
46993
|
});
|
|
46901
46994
|
});
|
|
46902
|
-
var
|
|
46995
|
+
var createRule11;
|
|
46903
46996
|
var ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
|
|
46904
46997
|
var rule;
|
|
46905
46998
|
var v4_import_default;
|
|
46906
46999
|
var init_v4_import = __esm(() => {
|
|
46907
|
-
|
|
47000
|
+
createRule11 = import_utils11.ESLintUtils.RuleCreator(() => {
|
|
46908
47001
|
return `https://www.remotion.dev/docs/4-0-migration`;
|
|
46909
47002
|
});
|
|
46910
|
-
rule =
|
|
47003
|
+
rule = createRule11({
|
|
46911
47004
|
name: "v4-config-import",
|
|
46912
47005
|
meta: {
|
|
46913
47006
|
type: "problem",
|
|
@@ -46941,14 +47034,14 @@ var init_v4_import = __esm(() => {
|
|
|
46941
47034
|
});
|
|
46942
47035
|
v4_import_default = rule;
|
|
46943
47036
|
});
|
|
46944
|
-
var
|
|
47037
|
+
var createRule12;
|
|
46945
47038
|
var VolumeCallback = "Prefer a callback function for setting the volume: `volume={(f) => interpolate(...)}`. See https://www.remotion.dev/docs/audio/volume";
|
|
46946
47039
|
var volume_callback_default;
|
|
46947
47040
|
var init_volume_callback = __esm(() => {
|
|
46948
|
-
|
|
47041
|
+
createRule12 = import_utils12.ESLintUtils.RuleCreator(() => {
|
|
46949
47042
|
return `https://github.com/remotion-dev/remotion`;
|
|
46950
47043
|
});
|
|
46951
|
-
volume_callback_default =
|
|
47044
|
+
volume_callback_default = createRule12({
|
|
46952
47045
|
name: "volume-callback",
|
|
46953
47046
|
meta: {
|
|
46954
47047
|
type: "problem",
|
|
@@ -47000,6 +47093,12 @@ var init_volume_callback = __esm(() => {
|
|
|
47000
47093
|
if (expression.type === "ArrowFunctionExpression") {
|
|
47001
47094
|
return;
|
|
47002
47095
|
}
|
|
47096
|
+
if (expression.type === "FunctionExpression") {
|
|
47097
|
+
return;
|
|
47098
|
+
}
|
|
47099
|
+
if (expression.type === "Identifier") {
|
|
47100
|
+
return;
|
|
47101
|
+
}
|
|
47003
47102
|
context.report({
|
|
47004
47103
|
messageId: "VolumeCallback",
|
|
47005
47104
|
node
|
|
@@ -47009,17 +47108,17 @@ var init_volume_callback = __esm(() => {
|
|
|
47009
47108
|
}
|
|
47010
47109
|
});
|
|
47011
47110
|
});
|
|
47012
|
-
var
|
|
47111
|
+
var createRule13;
|
|
47013
47112
|
var NoNativeImgTag = "Prefer the <Img /> tag from 'remotion' package, because it will wait until the image is loaded when you are rendering your video.";
|
|
47014
47113
|
var NoNativeIFrameTag = "Prefer the <IFrame /> tag from 'remotion' package, because it will wait until the iframe is loaded when you are rendering your video.";
|
|
47015
47114
|
var NoNativeAudioTag = "Use the <Audio /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
|
|
47016
47115
|
var NoNativeVideoTag = "Use the <OffthreadVideo /> tag from 'remotion' package, because it will synchronize with the Remotion timeline.";
|
|
47017
47116
|
var warn_native_media_tag_default;
|
|
47018
47117
|
var init_warn_native_media_tag = __esm(() => {
|
|
47019
|
-
|
|
47118
|
+
createRule13 = import_utils13.ESLintUtils.RuleCreator(() => {
|
|
47020
47119
|
return `https://github.com/remotion-dev/remotion`;
|
|
47021
47120
|
});
|
|
47022
|
-
warn_native_media_tag_default =
|
|
47121
|
+
warn_native_media_tag_default = createRule13({
|
|
47023
47122
|
name: "warn-native-media-tag",
|
|
47024
47123
|
meta: {
|
|
47025
47124
|
type: "problem",
|
|
@@ -47114,6 +47213,7 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47114
47213
|
init_no_duration_frames_infinity();
|
|
47115
47214
|
init_no_from_0();
|
|
47116
47215
|
init_no_string_assets();
|
|
47216
|
+
init_slow_css_property();
|
|
47117
47217
|
init_staticfile_no_relative();
|
|
47118
47218
|
init_staticfile_no_remote();
|
|
47119
47219
|
init_use_gif_component();
|
|
@@ -47132,6 +47232,7 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47132
47232
|
"staticfile-no-relative": staticfile_no_relative_default,
|
|
47133
47233
|
"staticfile-no-remote": staticfile_no_remote_default,
|
|
47134
47234
|
"no-background-image": no_background_image_default,
|
|
47235
|
+
"slow-css-property": slow_css_property_default,
|
|
47135
47236
|
"v4-config-import": v4_import_default
|
|
47136
47237
|
};
|
|
47137
47238
|
var recommendedRuleConfig = {
|
|
@@ -47146,6 +47247,7 @@ var require_src2 = __commonJS2((exports, module) => {
|
|
|
47146
47247
|
"@remotion/staticfile-no-relative": "error",
|
|
47147
47248
|
"@remotion/staticfile-no-remote": "error",
|
|
47148
47249
|
"@remotion/no-background-image": "error",
|
|
47250
|
+
"@remotion/slow-css-property": "warn",
|
|
47149
47251
|
"@remotion/v4-config-import": "error"
|
|
47150
47252
|
};
|
|
47151
47253
|
var configs = {
|
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.319",
|
|
7
7
|
"description": "Default configuration for Remotion templates (ESLint >= 9)",
|
|
8
8
|
"main": "dist/esm/index.mjs",
|
|
9
9
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"eslint-plugin-react": "7.37.4",
|
|
27
27
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
|
-
"@remotion/eslint-plugin": "4.0.
|
|
30
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
29
|
+
"@remotion/eslint-plugin": "4.0.319",
|
|
30
|
+
"@remotion/eslint-config-internal": "4.0.319"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"remotion",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"homepage": "https://www.remotion.dev/docs/brownfield#install-the-eslint-plugin",
|
|
51
51
|
"scripts": {
|
|
52
52
|
"lint": "eslint src",
|
|
53
|
-
"formatting": "prettier src --check",
|
|
53
|
+
"formatting": "prettier --experimental-cli src --check",
|
|
54
54
|
"make": "tsc -d && bun --env-file=../.env.bundle bundle.ts"
|
|
55
55
|
}
|
|
56
56
|
}
|