Skip to content

Commit 8fdb40b

Browse files
P0labrDHugauka
andauthored
feat(a11y): remove custom rules from a11y config (#65)
* BREAKING CHANGE: remove custom rules from config a11y * docs: update a11y documentation for removed rules * fix(example-app): no custom rules in eslint config --------- Co-authored-by: Hugo K <hugo.khlaut@student-cs.fr>
1 parent 675408d commit 8fdb40b

8 files changed

Lines changed: 9 additions & 29 deletions

example-app/.eslintrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
"files": ["*.test.tsx"],
77
"extends": "plugin:@bam.tech/tests"
88
}
9-
],
10-
"rules": {
11-
"@bam.tech/require-named-effect": "error"
12-
}
9+
]
1310
}

packages/eslint-plugin/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,17 @@ This plugin exports some custom rules that you can optionally use in your projec
8282

8383
<!-- begin auto-generated rules list -->
8484

85-
💼 Configurations enabled in.\
86-
♿ Set in the `a11y` configuration.\
8785
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
8886
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
8987

90-
| Name                                        | Description | 💼 | 🔧 | 💡 |
91-
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------- | :-- | :-- | :-- |
92-
| [accessibility-props-require-accessible](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/accessibility-props-require-accessible.md) | Requires accessible prop when accessibility props are defined | | 🔧 | |
93-
| [do-not-use-role-on-image](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/do-not-use-role-on-image.md) | Disallow role prop on Image component | | 🔧 | |
94-
| [image-requires-accessible-prop](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/image-requires-accessible-prop.md) | Require accessible prop on image components | | 🔧 | 💡 |
95-
| [require-named-effect](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/require-named-effect.md) | Enforces the use of named functions inside a useEffect | | | |
96-
| [requires-accessibility-label](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/requires-accessibility-label.md) | Enforces label when component accessible | | | 💡 |
97-
| [requires-accessibility-role-when-accessible](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/requires-accessibility-role-when-accessible.md) | Enforces accessibilityRole or role when component is accessible | | | 💡 |
88+
| Name                                        | Description | 🔧 | 💡 |
89+
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------- | :-- | :-- |
90+
| [accessibility-props-require-accessible](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/accessibility-props-require-accessible.md) | Requires accessible prop when accessibility props are defined | 🔧 | |
91+
| [do-not-use-role-on-image](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/do-not-use-role-on-image.md) | Disallow role prop on Image component | 🔧 | |
92+
| [image-requires-accessible-prop](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/image-requires-accessible-prop.md) | Require accessible prop on image components | 🔧 | 💡 |
93+
| [require-named-effect](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/require-named-effect.md) | Enforces the use of named functions inside a useEffect | | |
94+
| [requires-accessibility-label](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/requires-accessibility-label.md) | Enforces label when component accessible | | 💡 |
95+
| [requires-accessibility-role-when-accessible](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/requires-accessibility-role-when-accessible.md) | Enforces accessibilityRole or role when component is accessible | | 💡 |
9896

9997
<!-- end auto-generated rules list -->
10098

packages/eslint-plugin/docs/rules/accessibility-props-require-accessible.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Requires accessible prop when accessibility props are defined (`@bam.tech/accessibility-props-require-accessible`)
22

3-
💼 This rule is enabled in the ♿ `a11y` config.
4-
53
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
64

75
<!-- end auto-generated rule header -->

packages/eslint-plugin/docs/rules/do-not-use-role-on-image.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Disallow role prop on Image component (`@bam.tech/do-not-use-role-on-image`)
22

3-
💼 This rule is enabled in the ♿ `a11y` config.
4-
53
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
64

75
<!-- end auto-generated rule header -->

packages/eslint-plugin/docs/rules/image-requires-accessible-prop.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Require accessible prop on image components (`@bam.tech/image-requires-accessible-prop`)
22

3-
💼 This rule is enabled in the ♿ `a11y` config.
4-
53
🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
64

75
<!-- end auto-generated rule header -->

packages/eslint-plugin/docs/rules/requires-accessibility-label.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Enforces label when component accessible (`@bam.tech/requires-accessibility-label`)
22

3-
💼 This rule is enabled in the ♿ `a11y` config.
4-
53
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
64

75
<!-- end auto-generated rule header -->

packages/eslint-plugin/docs/rules/requires-accessibility-role-when-accessible.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Enforces accessibilityRole or role when component is accessible (`@bam.tech/requires-accessibility-role-when-accessible`)
22

3-
💼 This rule is enabled in the ♿ `a11y` config.
4-
53
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
64

75
<!-- end auto-generated rule header -->

packages/eslint-plugin/lib/configs/a11y.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@ module.exports = defineConfig({
77
extends: ["plugin:react-native-a11y/all"],
88
rules: {
99
"react-native-a11y/has-accessibility-hint": "off",
10-
"@bam.tech/image-requires-accessible-prop": "error",
11-
"@bam.tech/do-not-use-role-on-image": "error",
12-
"@bam.tech/accessibility-props-require-accessible": "error",
13-
"@bam.tech/requires-accessibility-role-when-accessible": "error",
14-
"@bam.tech/requires-accessibility-label": "error",
1510
},
1611
});

0 commit comments

Comments
 (0)