test-a11y-js 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -129,6 +129,61 @@ module.exports = {
129
129
  - `plugin:test-a11y-js/react` - Optimized for React/JSX
130
130
  - `plugin:test-a11y-js/vue` - Optimized for Vue SFC
131
131
 
132
+ #### Ignoring Files and Lines
133
+
134
+ Sometimes you need to ignore specific files or lines. Here are your options:
135
+
136
+ **Ignore a single line:**
137
+ ```jsx
138
+ // eslint-disable-next-line test-a11y-js/image-alt
139
+ <img src="decorative.jpg" alt="" />
140
+ ```
141
+
142
+ **Ignore an entire file:**
143
+ ```jsx
144
+ /* eslint-disable test-a11y-js/heading-order */
145
+ // Entire file exempt from heading-order rule
146
+ ```
147
+
148
+ **Ignore directories:**
149
+ ```javascript
150
+ // .eslintrc.js
151
+ module.exports = {
152
+ plugins: ['test-a11y-js'],
153
+ extends: ['plugin:test-a11y-js/recommended'],
154
+ ignorePatterns: [
155
+ '**/node_modules/**',
156
+ '**/dist/**',
157
+ '**/*.test.{js,ts,jsx,tsx}' // Optional: exclude test files
158
+ ]
159
+ }
160
+ ```
161
+
162
+ **Disable rules for specific files:**
163
+ ```javascript
164
+ // .eslintrc.js
165
+ module.exports = {
166
+ plugins: ['test-a11y-js'],
167
+ extends: ['plugin:test-a11y-js/recommended'],
168
+ overrides: [
169
+ {
170
+ files: ['**/legacy/**'],
171
+ rules: {
172
+ 'test-a11y-js/**': 'warn' // Only warnings in legacy code
173
+ }
174
+ }
175
+ ]
176
+ }
177
+ ```
178
+
179
+ **Vue template ignore:**
180
+ ```vue
181
+ <!-- eslint-disable-next-line test-a11y-js/image-alt -->
182
+ <img src="photo.jpg" />
183
+ ```
184
+
185
+ > **Best Practice:** Always add a comment explaining why you're ignoring a rule. For example: `// eslint-disable-next-line test-a11y-js/image-alt -- Decorative image, no semantic meaning`
186
+
132
187
  ### Quick Start for Large Projects
133
188
 
134
189
  ```javascript
package/dist/index.js CHANGED
@@ -4134,7 +4134,7 @@ var form_validation_default = rule16;
4134
4134
  var plugin = {
4135
4135
  meta: {
4136
4136
  name: "test-a11y-js",
4137
- version: "0.8.0"
4137
+ version: "0.8.2"
4138
4138
  },
4139
4139
  rules: {
4140
4140
  "image-alt": image_alt_default,
package/dist/index.mjs CHANGED
@@ -4115,7 +4115,7 @@ var form_validation_default = rule16;
4115
4115
  var plugin = {
4116
4116
  meta: {
4117
4117
  name: "test-a11y-js",
4118
- version: "0.8.0"
4118
+ version: "0.8.2"
4119
4119
  },
4120
4120
  rules: {
4121
4121
  "image-alt": image_alt_default,
@@ -4133,7 +4133,7 @@ var form_validation_default = rule16;
4133
4133
  var plugin = {
4134
4134
  meta: {
4135
4135
  name: "test-a11y-js",
4136
- version: "0.8.0"
4136
+ version: "0.8.2"
4137
4137
  },
4138
4138
  rules: {
4139
4139
  "image-alt": image_alt_default,
@@ -4115,7 +4115,7 @@ var form_validation_default = rule16;
4115
4115
  var plugin = {
4116
4116
  meta: {
4117
4117
  name: "test-a11y-js",
4118
- version: "0.8.0"
4118
+ version: "0.8.2"
4119
4119
  },
4120
4120
  rules: {
4121
4121
  "image-alt": image_alt_default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-a11y-js",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Zero-config accessibility testing for React, Vue & JSX. ESLint plugin + programmatic API. Catch a11y issues before production.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",