@remotion/eslint-plugin 4.0.533 → 4.0.535
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 +13 -13
- package/dist/esm/index.mjs +25 -15
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -712,29 +712,29 @@ var staticfile_no_relative_default = createRule10({
|
|
|
712
712
|
}
|
|
713
713
|
const firstArg = args[0];
|
|
714
714
|
if (firstArg.type === "Literal") {
|
|
715
|
-
const
|
|
716
|
-
if (typeof
|
|
715
|
+
const value = firstArg.value;
|
|
716
|
+
if (typeof value !== "string") {
|
|
717
717
|
return;
|
|
718
718
|
}
|
|
719
|
-
if (
|
|
719
|
+
if (value.startsWith("./")) {
|
|
720
720
|
context.report({
|
|
721
721
|
messageId: "RelativePathStaticFile",
|
|
722
722
|
node
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
if (
|
|
725
|
+
if (value.startsWith("../")) {
|
|
726
726
|
context.report({
|
|
727
727
|
messageId: "RelativePathStaticFile",
|
|
728
728
|
node
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
if (
|
|
731
|
+
if (value.startsWith("public/")) {
|
|
732
732
|
context.report({
|
|
733
733
|
messageId: "PublicStaticFile",
|
|
734
734
|
node
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
|
-
if (
|
|
737
|
+
if (value.startsWith("/Users") || value.startsWith("/home") || value.startsWith("/tmp") || value.startsWith("/etc") || value.startsWith("/opt") || value.startsWith("/var") || value.startsWith("C:") || value.startsWith("D:") || value.startsWith("E:")) {
|
|
738
738
|
context.report({
|
|
739
739
|
messageId: "AbsoluteStaticFile",
|
|
740
740
|
node
|
|
@@ -786,17 +786,17 @@ var staticfile_no_remote_default = createRule11({
|
|
|
786
786
|
}
|
|
787
787
|
const firstArg = args[0];
|
|
788
788
|
if (firstArg.type === "Literal") {
|
|
789
|
-
const
|
|
790
|
-
if (typeof
|
|
789
|
+
const value = firstArg.value;
|
|
790
|
+
if (typeof value !== "string") {
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
|
-
if (
|
|
793
|
+
if (value.startsWith("http://")) {
|
|
794
794
|
context.report({
|
|
795
795
|
messageId: "RelativePathStaticFile",
|
|
796
796
|
node
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
if (
|
|
799
|
+
if (value.startsWith("https://")) {
|
|
800
800
|
context.report({
|
|
801
801
|
messageId: "RelativePathStaticFile",
|
|
802
802
|
node
|
|
@@ -878,11 +878,11 @@ var use_gif_component_default = createRule12({
|
|
|
878
878
|
}
|
|
879
879
|
const firstArg = args[0];
|
|
880
880
|
if (firstArg.type === "Literal") {
|
|
881
|
-
const
|
|
882
|
-
if (typeof
|
|
881
|
+
const value = firstArg.value;
|
|
882
|
+
if (typeof value !== "string") {
|
|
883
883
|
return;
|
|
884
884
|
}
|
|
885
|
-
if (
|
|
885
|
+
if (value.includes(".gif")) {
|
|
886
886
|
context.report({
|
|
887
887
|
messageId: "UseGifComponent",
|
|
888
888
|
node
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
2
|
-
var __esm = (fn, res) => () =>
|
|
2
|
+
var __esm = (fn, res, err) => () => {
|
|
3
|
+
if (fn)
|
|
4
|
+
try {
|
|
5
|
+
res = fn(fn = 0);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
err = [e];
|
|
8
|
+
}
|
|
9
|
+
if (err)
|
|
10
|
+
throw err[0];
|
|
11
|
+
return res;
|
|
12
|
+
};
|
|
3
13
|
|
|
4
14
|
// src/rules/deterministic-randomness.ts
|
|
5
15
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
@@ -741,29 +751,29 @@ var init_staticfile_no_relative = __esm(() => {
|
|
|
741
751
|
}
|
|
742
752
|
const firstArg = args[0];
|
|
743
753
|
if (firstArg.type === "Literal") {
|
|
744
|
-
const
|
|
745
|
-
if (typeof
|
|
754
|
+
const value = firstArg.value;
|
|
755
|
+
if (typeof value !== "string") {
|
|
746
756
|
return;
|
|
747
757
|
}
|
|
748
|
-
if (
|
|
758
|
+
if (value.startsWith("./")) {
|
|
749
759
|
context.report({
|
|
750
760
|
messageId: "RelativePathStaticFile",
|
|
751
761
|
node
|
|
752
762
|
});
|
|
753
763
|
}
|
|
754
|
-
if (
|
|
764
|
+
if (value.startsWith("../")) {
|
|
755
765
|
context.report({
|
|
756
766
|
messageId: "RelativePathStaticFile",
|
|
757
767
|
node
|
|
758
768
|
});
|
|
759
769
|
}
|
|
760
|
-
if (
|
|
770
|
+
if (value.startsWith("public/")) {
|
|
761
771
|
context.report({
|
|
762
772
|
messageId: "PublicStaticFile",
|
|
763
773
|
node
|
|
764
774
|
});
|
|
765
775
|
}
|
|
766
|
-
if (
|
|
776
|
+
if (value.startsWith("/Users") || value.startsWith("/home") || value.startsWith("/tmp") || value.startsWith("/etc") || value.startsWith("/opt") || value.startsWith("/var") || value.startsWith("C:") || value.startsWith("D:") || value.startsWith("E:")) {
|
|
767
777
|
context.report({
|
|
768
778
|
messageId: "AbsoluteStaticFile",
|
|
769
779
|
node
|
|
@@ -818,17 +828,17 @@ var init_staticfile_no_remote = __esm(() => {
|
|
|
818
828
|
}
|
|
819
829
|
const firstArg = args[0];
|
|
820
830
|
if (firstArg.type === "Literal") {
|
|
821
|
-
const
|
|
822
|
-
if (typeof
|
|
831
|
+
const value = firstArg.value;
|
|
832
|
+
if (typeof value !== "string") {
|
|
823
833
|
return;
|
|
824
834
|
}
|
|
825
|
-
if (
|
|
835
|
+
if (value.startsWith("http://")) {
|
|
826
836
|
context.report({
|
|
827
837
|
messageId: "RelativePathStaticFile",
|
|
828
838
|
node
|
|
829
839
|
});
|
|
830
840
|
}
|
|
831
|
-
if (
|
|
841
|
+
if (value.startsWith("https://")) {
|
|
832
842
|
context.report({
|
|
833
843
|
messageId: "RelativePathStaticFile",
|
|
834
844
|
node
|
|
@@ -913,11 +923,11 @@ var init_use_gif_component = __esm(() => {
|
|
|
913
923
|
}
|
|
914
924
|
const firstArg = args[0];
|
|
915
925
|
if (firstArg.type === "Literal") {
|
|
916
|
-
const
|
|
917
|
-
if (typeof
|
|
926
|
+
const value = firstArg.value;
|
|
927
|
+
if (typeof value !== "string") {
|
|
918
928
|
return;
|
|
919
929
|
}
|
|
920
|
-
if (
|
|
930
|
+
if (value.includes(".gif")) {
|
|
921
931
|
context.report({
|
|
922
932
|
messageId: "UseGifComponent",
|
|
923
933
|
node
|
|
@@ -1183,7 +1193,7 @@ var init_warn_native_media_tag = __esm(() => {
|
|
|
1183
1193
|
});
|
|
1184
1194
|
|
|
1185
1195
|
// src/index.ts
|
|
1186
|
-
var require_src = __commonJS((exports, module)
|
|
1196
|
+
var require_src = __commonJS(function(exports, module) {
|
|
1187
1197
|
init_deterministic_randomness();
|
|
1188
1198
|
init_even_dimensions();
|
|
1189
1199
|
init_no_background_image();
|
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.
|
|
6
|
+
"version": "4.0.535",
|
|
7
7
|
"description": "Rules for writing Remotion code",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"test": "node src/tests/execute.mjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"eslint": ">=7.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"vitest": "
|
|
29
|
+
"vitest": "5.0.3",
|
|
30
30
|
"eslint": "8.57.0",
|
|
31
31
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
32
32
|
},
|