@remotion/eslint-config
The Remotion ESLint configs provide recommended rules for JavaScript, TypeScript, 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 10 | @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 10
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.536 of Remotion.npm i --save-exact @remotion/eslint-config-flat@4.0.536
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.536 of Remotion.pnpm i @remotion/eslint-config-flat@4.0.536
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.536 of Remotion.bun i @remotion/eslint-config-flat@4.0.536
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.536 of Remotion.yarn --exact add @remotion/eslint-config-flat@4.0.536
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;
The flat config also registers eslint-plugin-react, so you can enable additional react/* rules in a config object after ...config. Its recommended preset is not enabled by default.
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, and React Hooks rules still apply to the whole project. Only the rules from @remotion/eslint-plugin are limited to remotionDir.
ESLint 10 is supported from Remotion v4.0.536. It requires Node.js 20.19 or later on the 20.x release line, 22.13 or later on the 22.x release line, or 24 and later.
When creating a project, templates using the flat config select ESLint 9 if your Node.js version cannot run ESLint 10. ESLint 9 requires Node.js 18.18 or later on the 18.x release line, 20.9 or later on the 20.x release line, or 21.1 and later. Templates may have additional Node.js requirements.
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.536 of Remotion.npm i --save-exact @remotion/eslint-config@4.0.536
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.536 of Remotion.pnpm i @remotion/eslint-config@4.0.536
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.536 of Remotion.bun i @remotion/eslint-config@4.0.536
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.536 of Remotion.yarn --exact add @remotion/eslint-config@4.0.536
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.