Registry / testing / eslint-plugin-reanimated

eslint-plugin-reanimated

JSON →
library2.0.1jsnpmunverified

eslint-plugin-reanimated v2.0.1 is an ESLint plugin that enforces best practices when using Reanimated 2 and 3 worklets in React Native projects. It provides rules to detect JavaScript functions called inside worklets (which break the UI thread), disallowed syntax, and multiple animated style usages. Requires TypeScript >=4.1.3 and ESLint >=8. Actively maintained, updated for Reanimated 3.4.2+. Differentiator: uses TypeScript compiler services for accurate type resolution, unlike lighter lint-based alternatives.

npm install eslint-plugin-reanimated
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAN
E
eslint-plugin-reanimated
testingjavascriptv2.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
// In .eslintrc: plugins: ['reanimated']
plugins: ['eslint-plugin-reanimated']
Use the short name 'reanimated', not the full npm package name.
rules
rules: { 'reanimated/js-function-in-worklet': 2 }
rules: { 'js-function-in-worklet': 2 }
Rule names must be prefixed with 'reanimated/'.
parserOptions
parserOptions: { project: './tsconfig.json' }
parserOptions: { tsconfigRootDir: __dirname }
You must provide the path to tsconfig.json for type resolution.

Minimal ESLint configuration enabling all Reanimated rules with TypeScript project path.

// .eslintrc.js module.exports = { plugins: ['reanimated'], parserOptions: { project: './tsconfig.json', }, rules: { 'reanimated/js-function-in-worklet': 2, 'reanimated/unsupported-syntax': 2, 'reanimated/no-multiple-animated-style-usages': 2, }, };
Debug
Known issues
breakingThe no-multiple-animated-style-usages rule no longer works in v2.0.0 due to internal changes.
fix
Remove or disable that rule, or pin to v1.x if you still need it.
affects: >=2.0.0
gotchaExternal functions used in worklets must have the @worklet JSDoc annotation.
fix
Ensure imported functions (e.g., from react-native-redash) are marked with /** @worklet */.
affects: >=1.0.0
gotchaThe plugin relies on TypeScript compiler services; it will not work without a valid tsconfig.json.
fix
Set parserOptions.project to the path of your tsconfig.json.
affects: >=1.0.0
deprecatedRule 'no-multiple-animated-style-usages' is deprecated as of v2.0.0.
fix
Remove the rule from configuration; it will not work.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot read property 'getTypeOfSymbolAtLocation' of undefined
Missing or incorrect parserOptions.project in ESLint config.
fix
Add 'parserOptions: { project: './tsconfig.json' }' to your ESLint config.
Parsing error: The keyword 'const' is reserved
ESLint parser not set to TypeScript parser (e.g., @typescript-eslint/parser).
fix
Install @typescript-eslint/parser and set 'parser: "@typescript-eslint/parser"' in ESLint config.
Definition for rule 'reanimated/js-function-in-worklet' was not found
Plugin not loaded or wrong name.
fix
Ensure 'plugins: ["reanimated"]' is present, not 'eslint-plugin-reanimated'.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency, required to run the plugin
typescriptrequiredpeer dependency, plugin uses TypeScript compiler services
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-reanimated — npm install eslint-plugin-reanimated · libregistry