Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JSX A11y #196

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"eslint-plugin-inclusive-language": "~2.2.0",
"eslint-plugin-jsdoc": "~43.0.7",
"eslint-plugin-jsonc": "~2.7.0",
"eslint-plugin-jsx-a11y": "~6.7.1",
"eslint-plugin-mdx": "~2.0.5",
"eslint-plugin-n": "~15.7.0",
"eslint-plugin-node": "~11.1.0",
Expand Down
158 changes: 158 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions scripts/generate-rule-files/src/plugins-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const PLUGIN_REGISTRY: Readonly<Record<string, Plugin>> = {
name: 'Jsonc',
module: 'eslint-plugin-jsonc',
},
'jsx-a11y': {
name: 'JsxA11y',
module: 'eslint-plugin-jsx-a11y',
},
mdx: {
name: 'Mdx',
module: 'eslint-plugin-mdx',
Expand Down
8 changes: 8 additions & 0 deletions src/config/extends/eslint-plugin-jsx-a11y.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Eslint JSX A11y extensions.
*
* @see [Eslint JSX A11y extensions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
*/
export type JsxA11yExtensions =
| 'plugin:jsx-a11y/strict'
| 'plugin:jsx-a11y/recommended';
2 changes: 2 additions & 0 deletions src/config/plugin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ export type Plugin = LiteralUnion<
| 'import'
| 'inclusive-language'
| 'jsdoc'
| 'jsx-a11y'
| 'mdx'
| 'prettier'
| 'promise'
| 'react-hooks'
| 'react'
| 'sonarjs'
| 'spellcheck'
Expand Down
2 changes: 2 additions & 0 deletions src/config/settings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ImportSettings } from './import';
import type { JSDocSettings } from './jsdoc';
import type { JsxA11ySettings } from './jsx-a11y';
import type { MdxSettings } from './mdx';
import type { NodeSettings } from './node';
import type { ReactSettings } from './react';
Expand All @@ -10,6 +11,7 @@ import type { ReactSettings } from './react';
export interface Settings
extends ImportSettings,
JSDocSettings,
JsxA11ySettings,
MdxSettings,
NodeSettings,
ReactSettings,
Expand Down
10 changes: 10 additions & 0 deletions src/config/settings/jsx-a11y.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* JSX A11y settings.
*
* @see [JSX A11y settings](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
*/
export interface JsxA11ySettings extends Partial<Record<string, unknown>> {
'jsx-a11y'?: {
components?: Record<string, string>;
};
}
2 changes: 2 additions & 0 deletions src/rules/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { GraphQLRules } from './graphql-eslint';
import type { ImportRules } from './import';
import type { JSDocRules } from './jsdoc';
import type { JsoncRules } from './jsonc';
import type { JsxA11yRules } from './jsx-a11y';
import type { NRules } from './n';
import type { NodeRules } from './node';
import type { PromiseRules } from './promise';
Expand Down Expand Up @@ -33,6 +34,7 @@ export type Rules = Partial<
ImportRules &
JSDocRules &
JsoncRules &
JsxA11yRules &
NodeRules &
NRules &
PromiseRules &
Expand Down
Loading