Registry / testing / eslint-plugin-react-native-animation-linter

eslint-plugin-react-native-animation-linter

JSON →
library0.1.2jsnpmunverified

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+.

npm install eslint-plugin-react-native-animation-linter
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-native-animation-linter
testingjavascriptv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

ESLint Plugin
Add to .eslintrc plugins array as 'react-native-animation-linter' and enable rule 'react-native-animation-linter/must-tear-down-animations'
Attempting to require the plugin directly
This is an ESLint plugin, not a separate import. Configure via eslintrc, not require().
Rule configuration
{ "plugins": ["react-native-animation-linter"], "rules": { "react-native-animation-linter/must-tear-down-animations": 2 } }
Using 'plugin:react-native-animation-linter/recommended' (no recommended config exists)
There is no shareable config; you must explicitly add the rule.
Rule import in custom rule
const mustTearDownAnimations = require('eslint-plugin-react-native-animation-linter').rules['must-tear-down-animations'];
import { rules } from 'eslint-plugin-react-native-animation-linter' (ESM not supported)
Plugin is CJS only; no ESM exports.

Installation and configuration of the ESLint plugin with the only available rule.

# Install ESLint (must be ^3.17.0 || ^4.0.0 || ^5.0.0) npm install eslint@^5.16.0 # Install the plugin npm install eslint-plugin-react-native-animation-linter@0.1.2 # .eslintrc.json { "plugins": ["react-native-animation-linter"], "rules": { "react-native-animation-linter/must-tear-down-animations": 2 } } # Run ESLint on a file npx eslint App.js
Debug
Known issues
gotchaPlugin only supports ESLint versions 3.x, 4.x, and 5.x. It does not work with ESLint 6+ (breaking change in plugin API).
fix
Downgrade ESLint to ^5.16.0 or use an alternative plugin that supports newer ESLint versions.
affects: >=6.0.0
deprecatedOnly one rule (must-tear-down-animations) exists. No updates since 2018; the plugin is effectively abandoned.
fix
Consider forking or implementing custom rules if more coverage is needed.
affects: >=0.0.0
gotchaRule 'must-tear-down-animations' may produce false positives for modern React Native animation patterns (e.g., useRef with cleanup).
fix
Suppress false positives with inline eslint-disable comments or update code to match the plugin's expectations.
affects: >=0.0.0
gotchaNo shared configuration available. You must manually add the plugin and rules to your ESLint config.
fix
Copy the configuration from the README.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'react-native-animation-linter': Cannot find module 'eslint-plugin-react-native-animation-linter'
The plugin is not installed or not in node_modules.
fix
Run `npm install eslint-plugin-react-native-animation-linter --save-dev`
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.
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.
fix
Use numeric severity: {"react-native-animation-linter/must-tear-down-animations": 2}
Error: Cannot find module 'eslint'
ESLint peer dependency is not installed.
fix
Run `npm install eslint@^5.0.0 --save-dev`
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
eslintrequiredpeer dependency for ESLint plugin interface
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-react-native-animation-linter — npm install eslint-plugin-react-native-animation-linter · libregistry