{"id":26960,"library":"eslint-plugin-react-native-animation-linter","title":"eslint-plugin-react-native-animation-linter","description":"An ESLint plugin that enforces safe management of React Native animations, particularly ensuring animated state variables are properly torn down to prevent memory leaks. Version 0.1.2 is the latest stable release with a single rule `must-tear-down-animations`. The plugin has no active development since its initial release; it supports only older ESLint versions (3.x, 4.x, 5.x) and is not compatible with ESLint 6+.","status":"abandoned","version":"0.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/khan/eslint-plugin-react-native-animation-linter","tags":["javascript","eslint-plugin","eslintplugin","react native animation","react native"],"install":[{"cmd":"npm install eslint-plugin-react-native-animation-linter","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-native-animation-linter","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-native-animation-linter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for ESLint plugin interface","package":"eslint","optional":false}],"imports":[{"note":"This is an ESLint plugin, not a separate import. Configure via eslintrc, not require().","wrong":"Attempting to require the plugin directly","symbol":"ESLint Plugin","correct":"Add to .eslintrc plugins array as 'react-native-animation-linter' and enable rule 'react-native-animation-linter/must-tear-down-animations'"},{"note":"There is no shareable config; you must explicitly add the rule.","wrong":"Using 'plugin:react-native-animation-linter/recommended' (no recommended config exists)","symbol":"Rule configuration","correct":"{\n  \"plugins\": [\"react-native-animation-linter\"],\n  \"rules\": {\n    \"react-native-animation-linter/must-tear-down-animations\": 2\n  }\n}"},{"note":"Plugin is CJS only; no ESM exports.","wrong":"import { rules } from 'eslint-plugin-react-native-animation-linter' (ESM not supported)","symbol":"Rule import in custom rule","correct":"const mustTearDownAnimations = require('eslint-plugin-react-native-animation-linter').rules['must-tear-down-animations'];"}],"quickstart":{"code":"# Install ESLint (must be ^3.17.0 || ^4.0.0 || ^5.0.0)\nnpm install eslint@^5.16.0\n\n# Install the plugin\nnpm install eslint-plugin-react-native-animation-linter@0.1.2\n\n# .eslintrc.json\n{\n  \"plugins\": [\"react-native-animation-linter\"],\n  \"rules\": {\n    \"react-native-animation-linter/must-tear-down-animations\": 2\n  }\n}\n\n# Run ESLint on a file\nnpx eslint App.js","lang":"javascript","description":"Installation and configuration of the ESLint plugin with the only available rule."},"warnings":[{"fix":"Downgrade ESLint to ^5.16.0 or use an alternative plugin that supports newer ESLint versions.","message":"Plugin only supports ESLint versions 3.x, 4.x, and 5.x. It does not work with ESLint 6+ (breaking change in plugin API).","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Consider forking or implementing custom rules if more coverage is needed.","message":"Only one rule (must-tear-down-animations) exists. No updates since 2018; the plugin is effectively abandoned.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Suppress false positives with inline eslint-disable comments or update code to match the plugin's expectations.","message":"Rule 'must-tear-down-animations' may produce false positives for modern React Native animation patterns (e.g., useRef with cleanup).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Copy the configuration from the README.","message":"No shared configuration available. You must manually add the plugin and rules to your ESLint config.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install eslint-plugin-react-native-animation-linter --save-dev`","cause":"The plugin is not installed or not in node_modules.","error":"Error: Failed to load plugin 'react-native-animation-linter': Cannot find module 'eslint-plugin-react-native-animation-linter'"},{"fix":"Use numeric severity: {\"react-native-animation-linter/must-tear-down-animations\": 2}","cause":"Using string severity 'error' instead of number 2 or 'error' string is not allowed in older ESLint versions? Actually this might be a version issue; but the plugin expects numeric value.","error":"Error: ESLint configuration in .eslintrc.json is invalid: - Configuration for rule \"react-native-animation-linter/must-tear-down-animations\" is invalid: Value \"error\" should be number or object."},{"fix":"Run `npm install eslint@^5.0.0 --save-dev`","cause":"ESLint peer dependency is not installed.","error":"Error: Cannot find module 'eslint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}