Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/eslint-config-flat`: Disable slow typed rules

Jonny Burger9a3df4cbcab5
diff --git a/packages/eslint-config-flat/package.json b/packages/eslint-config-flat/package.json
index 4cd3300f7e..cddfa09302 100644
--- a/packages/eslint-config-flat/package.json
+++ b/packages/eslint-config-flat/package.json
@@ -29,7 +29,7 @@
"typescript-eslint": "8.21.0",
"@eslint/js": "9.19.0",
"eslint-plugin-react": "7.37.4",
- "eslint-plugin-react-hooks": "5.2.0-canary-de1eaa26-20250124",
+ "eslint-plugin-react-hooks": "5.2.0",
"@remotion/eslint-config-internal": "workspace:*",
"eslint": "9.19.0"
},
diff --git a/packages/eslint-config-flat/src/index.ts b/packages/eslint-config-flat/src/index.ts
index 0c6d0118a9..b5225ea5f0 100644
--- a/packages/eslint-config-flat/src/index.ts
+++ b/packages/eslint-config-flat/src/index.ts
@@ -1,7 +1,6 @@
import eslint from '@eslint/js';
import remotionPlugin from '@remotion/eslint-plugin';
import reactPlugin from 'eslint-plugin-react';
-// @ts-expect-error no types
import hooksPlugin from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';
@@ -22,6 +21,7 @@ export const makeConfig = ({
],
},
eslint.configs.recommended,
+ tseslint.configs.eslintRecommended,
tseslint.configs.recommended,
{
plugins: {
@@ -32,11 +32,13 @@ export const makeConfig = ({
...reactPlugin.configs.flat.recommended.languageOptions,
parser: tseslint.parser,
parserOptions: {
- projectService: true,
+ projectService: false,
},
},
rules: {
- ...reactPlugin.configs.flat.rules,
+ // wrong types πŸ™ˆ
+ ...(reactPlugin.configs.flat
+ .rules as unknown as typeof reactPlugin.configs.flat.rules.rules),
...hooksPlugin.configs.recommended.rules,
// Turning off rules that are too strict or don't apply to Remotion
'no-console': 'off',
@@ -61,10 +63,6 @@ export const makeConfig = ({
rules: remotionPlugin.configs.recommended.rules,
...(remotionDir ? {files: [remotionDir]} : {}),
},
- {
- files: ['**/*.js'],
- extends: [tseslint.configs.disableTypeChecked],
- },
);
export const config: tseslint.ConfigArray = makeConfig({
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4d4fb106ab..da6a334b47 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -903,8 +903,8 @@ importers:
specifier: 7.37.4
version: 7.37.4([email protected])
eslint-plugin-react-hooks:
- specifier: 5.2.0-canary-de1eaa26-20250124
- version: 5.2.0-canary-de1eaa26-20250124([email protected])
+ specifier: 5.2.0
+ version: 5.2.0([email protected])
typescript-eslint:
specifier: 8.21.0
@@ -15755,7 +15755,7 @@ packages:
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
- ts-api-utils: 2.0.0([email protected])
+ ts-api-utils: 2.0.1([email protected])
typescript: 5.5.4
transitivePeerDependencies:
- supports-color
@@ -15948,7 +15948,7 @@ packages:
'@typescript-eslint/utils': 8.21.0([email protected])([email protected])
debug: 4.4.0
eslint: 9.19.0
- ts-api-utils: 2.0.0([email protected])
+ ts-api-utils: 2.0.1([email protected])
typescript: 5.5.4
transitivePeerDependencies:
- supports-color
@@ -16076,7 +16076,7 @@ packages:
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.6.3
- ts-api-utils: 2.0.0([email protected])
+ ts-api-utils: 2.0.1([email protected])
typescript: 5.5.4
transitivePeerDependencies:
- supports-color
@@ -19597,7 +19597,7 @@ packages:
eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected])([email protected])([email protected])
eslint-plugin-jsx-a11y: 6.10.0([email protected])
eslint-plugin-react: 7.37.4([email protected])
- eslint-plugin-react-hooks: 5.0.0([email protected])
+ eslint-plugin-react-hooks: 5.2.0([email protected])
typescript: 5.5.4
transitivePeerDependencies:
- eslint-import-resolver-webpack
@@ -19778,9 +19778,10 @@ packages:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
dependencies:
eslint: 9.19.0
+ dev: false
- resolution: {integrity: sha512-BJdM6GV56L/RvLZ6SefQNB2hf1cDT9Jj6s31czVuNp3MzOCpE4owM5f0pj01+MPtu5yF3h1HL8e0BqSwOLl4Ww==}
+ resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==}
engines: {node: '>=10'}
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
@@ -29270,8 +29271,8 @@ packages:
dependencies:
typescript: 5.5.4
- resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==}
+ resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==}
engines: {node: '>=18.12'}
peerDependencies:
typescript: '>=4.8.4'