@remotion/eslint-config
The Remotion ESLint configs provide recommended rules for JavaScript, TypeScript, React, React Hooks, and Remotion.
Use a shared config when it can be the base ESLint configuration for your project. If your project already has an ESLint configuration, use @remotion/eslint-plugin directly instead.
Choose a config
| ESLint version | Package | Config format |
|---|---|---|
| 9 or later | @remotion/eslint-config-flat | Flat config |
| 7.15 through 8.x with Remotion 4 | @remotion/eslint-config | Legacy config |
| 8.57 or later with Remotion 5 | @remotion/eslint-config | Legacy config |
ESLint 9 and later
Install the flat config:
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/eslint-config-flat
This assumes you are currently using v4.0.526 of Remotion.npm i --save-exact @remotion/eslint-config-flat@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.pnpm i @remotion/eslint-config-flat@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.bun i @remotion/eslint-config-flat@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.yarn --exact add @remotion/eslint-config-flat@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.Add an eslint.config.mjs file:
eslint.config.mjsimport {config} from '@remotion/eslint-config-flat'; export default config;
To apply Remotion-specific rules only to part of an existing project, use makeConfig():
eslint.config.mjsimport {makeConfig} from '@remotion/eslint-config-flat'; export default makeConfig({ remotionDir: 'src/remotion/**/*.{ts,tsx}', });
The JavaScript, TypeScript, React, and React Hooks rules still apply to the whole project. Only the rules from @remotion/eslint-plugin are limited to remotionDir.
ESLint 8 and earlier
Install the legacy config:
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/eslint-config
This assumes you are currently using v4.0.526 of Remotion.npm i --save-exact @remotion/eslint-config@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.pnpm i @remotion/eslint-config@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.bun i @remotion/eslint-config@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.This assumes you are currently using v4.0.526 of Remotion.yarn --exact add @remotion/eslint-config@4.0.526
Also update
remotion and all `@remotion/*` packages to the same version.Remove all
^ character in front of the version numbers of it as it can lead to a version conflict.Extend it from your ESLint configuration:
.eslintrc{ "extends": ["@remotion"] }
Remotion 4 supports ESLint 7.15 and later. Remotion 5 requires ESLint 7.15.0 or later. Use @remotion/eslint-config-flat when upgrading to ESLint 9.