Skip to content

Commit d898403

Browse files
committed
feat: add a counter-example of a11y rules in example app
1 parent b4967df commit d898403

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

example-app/.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"root": true,
3-
"extends": "plugin:@bam.tech/recommended",
3+
"extends": ["plugin:@bam.tech/recommended", "plugin:@bam.tech/a11y"],
44
"overrides": [
55
{
66
"files": ["*.test.tsx"],

example-app/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Pressable, Text } from "react-native";
2+
3+
export const MyCustomButton = () => {
4+
return (
5+
<Pressable>
6+
<Text>Click here!</Text>
7+
<Text>Here is a short summary</Text>
8+
</Pressable>
9+
);
10+
};

example-app/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,31 @@
66
"scripts": {
77
"start": "node .",
88
"lint": "eslint .",
9-
"types":"tsc --noEmit"
9+
"types": "tsc --noEmit"
1010
},
1111
"devDependencies": {
12+
"@bam.tech/eslint-plugin": "0.3.3",
13+
"@bam.tech/typescript-config": "*",
1214
"@types/jest": "^29.5.2",
1315
"@types/react": "^18.2.14",
14-
"@bam.tech/typescript-config": "*",
15-
"@typescript-eslint/eslint-plugin": "^5.49.0",
16-
"eslint": "^8.32.0",
16+
"@typescript-eslint/eslint-plugin": "^5.61.0",
17+
"eslint": "^8.44.0",
1718
"eslint-plugin-jest": "^27.2.2",
1819
"eslint-plugin-jest-formatting": "^3.1.0",
1920
"eslint-plugin-prettier": "^4.2.1",
20-
"eslint-plugin-react": "^7.32.1",
21+
"eslint-plugin-react": "^7.31.11",
2122
"eslint-plugin-react-hooks": "^4.6.0",
2223
"eslint-plugin-react-native": "^4.0.0",
24+
"eslint-plugin-react-native-a11y": "^3.3.0",
2325
"eslint-plugin-testing-library": "^5.11.0",
2426
"jest": "^29.5.0",
2527
"prettier": "^2.8.8",
2628
"typescript": "^4.9.4"
2729
},
2830
"private": "true",
2931
"dependencies": {
32+
"expo": "^47.0.13",
3033
"react": "^18.2.0",
31-
"react-native": "^0.72.0",
32-
"expo": "^47.0.13"
34+
"react-native": "^0.72.0"
3335
}
3436
}

0 commit comments

Comments
 (0)