Gathering detailed insights and metrics for eslint-plugin-rn-a11y
Gathering detailed insights and metrics for eslint-plugin-rn-a11y
npm install eslint-plugin-rn-a11y
Typescript
Module System
Node Version
NPM Version
66.1
Supply Chain
92.6
Quality
74.1
Maintenance
100
Vulnerability
98.9
License
TypeScript (99.38%)
JavaScript (0.62%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
20,577
Last Day
25
Last Week
77
Last Month
268
Last Year
7,346
MIT License
19 Stars
130 Commits
1 Forks
2 Watchers
2 Branches
3 Contributors
Updated on Feb 13, 2025
Latest Version
1.9.0
Package Id
eslint-plugin-rn-a11y@1.9.0
Unpacked Size
86.16 kB
Size
20.60 kB
File Count
62
NPM Version
7.15.0
Node Version
12.22.1
Cumulative downloads
Total Downloads
Last Day
212.5%
25
Compared to previous day
Last Week
79.1%
77
Compared to previous week
Last Month
-24.3%
268
Compared to previous month
Last Year
15.4%
7,346
Compared to previous year
1
1
eslint-plugin-rn-a11y
is ESLint plugin for Accessibility in React Native.
This is ported(some rules, utils) and extended eslint-plugin-react-native-a11y.
yarn add -D eslint-plugin-rn-a11y
This plugin has several presets.
They can be set to the extends
property of eslintrc
.
plugin:rn-a11y/basic
: Common basic rules of iOS and Android.plugin:rn-a11y/iOS
: iOS-specific rules, includes basic
.plugin:rn-a11y/android
: Android-specific rules, includes basic
.plugin:rn-a11y/wcag
: WCAG2.x rules, includes basic
.plugin:rn-a11y/all
: Includes basic
, iOS
, wcag
, and android
.For example:
1// eslintrc.js 2 3module.exports = { 4 /* ... */ 5 extends: ['plugin:rn-a11y/basic'], 6 /* ... */ 7}
See: Rules.
Some rules have options. Check each rules for available options.
For example, to set the limit option with no-long-alt:
1// eslintrc.js 2 3module.exports = { 4 /* ... */ 5 rules: { 6 'rn-a11y/no-long-alt': [ 7 'error', 8 { 9 limit: 100, 10 }, 11 ], 12 }, 13 /* ... */ 14}
If you want to include custom components in rules, set the component name to rules
in .eslintrc.js
as shown below.
(When using TouchableXXX
and Pressable
, specify those as the Touchable
property.)
1// eslintrc.js 2 3const Image = ['MyPict'] 4const Touchable = ['MyTouchableOpacity', 'MyPressable'] 5 6const CustomComponents = { 7 Image, 8 Touchable, 9} 10 11module.exports = { 12 /* ... */ 13 rules: { 14 'rn-a11y/no-nested-touchables': ['error', CustomComponents], 15 'rn-a11y/touchable-has-alt': ['error', CustomComponents], 16 'rn-a11y/no-long-alt': ['error', { ...CustomComponents, limit: 100 }], // if specifying rule options 17 }, 18}
Custom component settings are for each rule. It cannot be set in common with other rules.
^10.12.0
or above.0.57
or above.6
or above.This plugin is not compatible with less than React Native 0.57
, please use eslint-plugin-react-native-a11y if using it.
React (not React Native) is not supported, please use eslint-plugin-jsx-a11y
Contribution is welcome!
Please see Contribution Guide.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
21 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More