Skip to main content

@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 versionPackageConfig format
9 or 10@remotion/eslint-config-flatFlat config
7.15 through 8.x with Remotion 4@remotion/eslint-configLegacy config
8.57 or later with Remotion 5@remotion/eslint-configLegacy config

ESLint 9 and 10​

Install the flat config:

npx remotion add @remotion/eslint-config-flat

Add an eslint.config.mjs file:

eslint.config.mjs
import {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.mjs
import {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:

npx remotion add @remotion/eslint-config

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.

See also​