Skip to content

🎥 Make videos programmatically with React

chore: define a recommended eslint plugin config for remotion

Antoine Caron364af1f042e0
diff --git a/packages/eslint-config/src/index.ts b/packages/eslint-config/src/index.ts
index 2af7c8c865..a98e09d046 100644
--- a/packages/eslint-config/src/index.ts
+++ b/packages/eslint-config/src/index.ts
@@ -1,7 +1,7 @@
import { autoImports } from "./auto-import-rules";
import { allowESLintShareableConfig } from "./patch-eslint";
-const baseExtends = ["eslint:recommended"];
+const baseExtends = ["eslint:recommended", "plugin:@remotion/eslint-plugin/recommended"];
const getRules = (typescript: boolean) => {
return {
@@ -560,14 +560,6 @@ const getRules = (typescript: boolean) => {
imports: autoImports,
},
],
- // Enable Remotion specific rules
- "@remotion/no-mp4-import": "off",
- "@remotion/warn-native-media-tag": "warn",
- "@remotion/deterministic-randomness": "warn",
- "@remotion/no-string-assets": "warn",
- "@remotion/even-dimensions": "warn",
- "@remotion/duration-in-frames": "warn",
- "@remotion/volume-callback": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
};
};
diff --git a/packages/eslint-plugin/src/index.ts b/packages/eslint-plugin/src/index.ts
index d6afde6e58..a00a940c9a 100644
--- a/packages/eslint-plugin/src/index.ts
+++ b/packages/eslint-plugin/src/index.ts
@@ -18,4 +18,15 @@ const rules = {
export = {
rules,
+ config: {
+ recommended: {
+ "@remotion/no-mp4-import": "error",
+ "@remotion/warn-native-media-tag": "error",
+ "@remotion/deterministic-randomness": "error",
+ "@remotion/no-string-assets": "error",
+ "@remotion/even-dimensions": "error",
+ "@remotion/duration-in-frames": "error",
+ "@remotion/volume-callback": "error",
+ },
+ }
};