@remotion/eslint-plugin
@remotion/eslint-plugin warns about incorrect or inefficient use of Remotion APIs.
Use the plugin directly when your project already has an ESLint configuration, for example in a Next.js or React Router project. To use Remotion's complete ESLint setup, use an @remotion/eslint-config package instead.
Installation
- Remotion CLI
- npm
- bun
- pnpm
- yarn
npx remotion add @remotion/eslint-plugin
This assumes you are currently using v4.0.526 of Remotion.npm i --save-exact @remotion/eslint-plugin@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-plugin@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-plugin@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-plugin@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.The plugin supports ESLint 7 and later. Use the legacy configuration with ESLint 7 or 8, and the flat configuration with ESLint 9 or later.
Flat config
Import flatPlugin and add it to your existing configuration. This example enables the recommended rules only for Remotion files:
eslint.config.mjsimport remotion from '@remotion/eslint-plugin'; export default [ // Your existing ESLint configuration { files: ['src/remotion/**/*.{js,jsx,ts,tsx}'], ...remotion.flatPlugin, }, ];
Legacy config
Extend plugin:@remotion/recommended in an override to enable the recommended rules only for Remotion files:
.eslintrc{ "overrides": [ { "files": ["src/remotion/**/*.{js,jsx,ts,tsx}"], "extends": ["plugin:@remotion/recommended"] } ] }