Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit fcb34cf

Browse files
azat-ioShinigami92
andauthored
Add support for JSX A11y (#196)
Co-authored-by: Shinigami92 <[email protected]>
1 parent e51d5d7 commit fcb34cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1761
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"eslint-plugin-inclusive-language": "~2.2.0",
7171
"eslint-plugin-jsdoc": "~43.0.7",
7272
"eslint-plugin-jsonc": "~2.7.0",
73+
"eslint-plugin-jsx-a11y": "~6.7.1",
7374
"eslint-plugin-mdx": "~2.0.5",
7475
"eslint-plugin-n": "~15.7.0",
7576
"eslint-plugin-node": "~11.1.0",

pnpm-lock.yaml

Lines changed: 158 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-rule-files/src/plugins-map.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export const PLUGIN_REGISTRY: Readonly<Record<string, Plugin>> = {
3939
name: 'Jsonc',
4040
module: 'eslint-plugin-jsonc',
4141
},
42+
'jsx-a11y': {
43+
name: 'JsxA11y',
44+
module: 'eslint-plugin-jsx-a11y',
45+
},
4246
mdx: {
4347
name: 'Mdx',
4448
module: 'eslint-plugin-mdx',
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Eslint JSX A11y extensions.
3+
*
4+
* @see [Eslint JSX A11y extensions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
5+
*/
6+
export type JsxA11yExtensions =
7+
| 'plugin:jsx-a11y/strict'
8+
| 'plugin:jsx-a11y/recommended';

src/config/plugin.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export type Plugin = LiteralUnion<
88
| 'import'
99
| 'inclusive-language'
1010
| 'jsdoc'
11+
| 'jsx-a11y'
1112
| 'mdx'
1213
| 'prettier'
1314
| 'promise'
15+
| 'react-hooks'
1416
| 'react'
1517
| 'sonarjs'
1618
| 'spellcheck'

src/config/settings/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ImportSettings } from './import';
22
import type { JSDocSettings } from './jsdoc';
3+
import type { JsxA11ySettings } from './jsx-a11y';
34
import type { MdxSettings } from './mdx';
45
import type { NodeSettings } from './node';
56
import type { ReactSettings } from './react';
@@ -10,6 +11,7 @@ import type { ReactSettings } from './react';
1011
export interface Settings
1112
extends ImportSettings,
1213
JSDocSettings,
14+
JsxA11ySettings,
1315
MdxSettings,
1416
NodeSettings,
1517
ReactSettings,

src/config/settings/jsx-a11y.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* JSX A11y settings.
3+
*
4+
* @see [JSX A11y settings](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
5+
*/
6+
export interface JsxA11ySettings extends Partial<Record<string, unknown>> {
7+
'jsx-a11y'?: {
8+
components?: Record<string, string>;
9+
};
10+
}

src/rules/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { GraphQLRules } from './graphql-eslint';
55
import type { ImportRules } from './import';
66
import type { JSDocRules } from './jsdoc';
77
import type { JsoncRules } from './jsonc';
8+
import type { JsxA11yRules } from './jsx-a11y';
89
import type { NRules } from './n';
910
import type { NodeRules } from './node';
1011
import type { PromiseRules } from './promise';
@@ -33,6 +34,7 @@ export type Rules = Partial<
3334
ImportRules &
3435
JSDocRules &
3536
JsoncRules &
37+
JsxA11yRules &
3638
NodeRules &
3739
NRules &
3840
PromiseRules &

0 commit comments

Comments
 (0)