Registry /
testing / eslint-plugin-react-native-animation-linter
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
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.
fixRun `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.
fixUse numeric severity: {"react-native-animation-linter/must-tear-down-animations": 2} Error: Cannot find module 'eslint'
ESLint peer dependency is not installed.
fixRun `npm install eslint@^5.0.0 --save-dev`
Audit
Dependencies
eslintrequiredpeer dependency for ESLint plugin interface