{"id":19910,"library":"eslint-plugin-reanimated","title":"eslint-plugin-reanimated","description":"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.","status":"active","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/wcandillon/eslint-plugin-reanimated","tags":["javascript"],"install":[{"cmd":"npm install eslint-plugin-reanimated","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-reanimated","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-reanimated","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, required to run the plugin","package":"eslint","optional":false},{"reason":"peer dependency, plugin uses TypeScript compiler services","package":"typescript","optional":false}],"imports":[{"note":"Use the short name 'reanimated', not the full npm package name.","wrong":"plugins: ['eslint-plugin-reanimated']","symbol":"plugin","correct":"// In .eslintrc: plugins: ['reanimated']"},{"note":"Rule names must be prefixed with 'reanimated/'.","wrong":"rules: { 'js-function-in-worklet': 2 }","symbol":"rules","correct":"rules: { 'reanimated/js-function-in-worklet': 2 }"},{"note":"You must provide the path to tsconfig.json for type resolution.","wrong":"parserOptions: { tsconfigRootDir: __dirname }","symbol":"parserOptions","correct":"parserOptions: { project: './tsconfig.json' }"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['reanimated'],\n  parserOptions: {\n    project: './tsconfig.json',\n  },\n  rules: {\n    'reanimated/js-function-in-worklet': 2,\n    'reanimated/unsupported-syntax': 2,\n    'reanimated/no-multiple-animated-style-usages': 2,\n  },\n};","lang":"javascript","description":"Minimal ESLint configuration enabling all Reanimated rules with TypeScript project path."},"warnings":[{"fix":"Remove or disable that rule, or pin to v1.x if you still need it.","message":"The no-multiple-animated-style-usages rule no longer works in v2.0.0 due to internal changes.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure imported functions (e.g., from react-native-redash) are marked with /** @worklet */.","message":"External functions used in worklets must have the @worklet JSDoc annotation.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set parserOptions.project to the path of your tsconfig.json.","message":"The plugin relies on TypeScript compiler services; it will not work without a valid tsconfig.json.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Remove the rule from configuration; it will not work.","message":"Rule 'no-multiple-animated-style-usages' is deprecated as of v2.0.0.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add 'parserOptions: { project: './tsconfig.json' }' to your ESLint config.","cause":"Missing or incorrect parserOptions.project in ESLint config.","error":"Error: Cannot read property 'getTypeOfSymbolAtLocation' of undefined"},{"fix":"Install @typescript-eslint/parser and set 'parser: \"@typescript-eslint/parser\"' in ESLint config.","cause":"ESLint parser not set to TypeScript parser (e.g., @typescript-eslint/parser).","error":"Parsing error: The keyword 'const' is reserved"},{"fix":"Ensure 'plugins: [\"reanimated\"]' is present, not 'eslint-plugin-reanimated'.","cause":"Plugin not loaded or wrong name.","error":"Definition for rule 'reanimated/js-function-in-worklet' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}