From ff79a9d3fb409e744a4c4fb5c80de11eabf74e02 Mon Sep 17 00:00:00 2001 From: Shinigami92 Date: Wed, 26 Apr 2023 18:36:48 +0200 Subject: [PATCH] add extends and settings --- src/config/extends/eslint-plugin-jsx-a11y.d.ts | 8 ++++++++ src/config/plugin.d.ts | 2 ++ src/config/settings/index.d.ts | 2 ++ src/config/settings/jsx-a11y.d.ts | 10 ++++++++++ src/rules/index.d.ts | 2 ++ 5 files changed, 24 insertions(+) create mode 100644 src/config/extends/eslint-plugin-jsx-a11y.d.ts create mode 100644 src/config/settings/jsx-a11y.d.ts diff --git a/src/config/extends/eslint-plugin-jsx-a11y.d.ts b/src/config/extends/eslint-plugin-jsx-a11y.d.ts new file mode 100644 index 00000000..d283fd9f --- /dev/null +++ b/src/config/extends/eslint-plugin-jsx-a11y.d.ts @@ -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'; diff --git a/src/config/plugin.d.ts b/src/config/plugin.d.ts index dae721e0..68997d53 100644 --- a/src/config/plugin.d.ts +++ b/src/config/plugin.d.ts @@ -8,9 +8,11 @@ export type Plugin = LiteralUnion< | 'import' | 'inclusive-language' | 'jsdoc' + | 'jsx-a11y' | 'mdx' | 'prettier' | 'promise' + | 'react-hooks' | 'react' | 'sonarjs' | 'spellcheck' diff --git a/src/config/settings/index.d.ts b/src/config/settings/index.d.ts index bf7daafb..5df35fd7 100644 --- a/src/config/settings/index.d.ts +++ b/src/config/settings/index.d.ts @@ -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'; @@ -10,6 +11,7 @@ import type { ReactSettings } from './react'; export interface Settings extends ImportSettings, JSDocSettings, + JsxA11ySettings, MdxSettings, NodeSettings, ReactSettings, diff --git a/src/config/settings/jsx-a11y.d.ts b/src/config/settings/jsx-a11y.d.ts new file mode 100644 index 00000000..4622b686 --- /dev/null +++ b/src/config/settings/jsx-a11y.d.ts @@ -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> { + 'jsx-a11y'?: { + components?: Record; + }; +} diff --git a/src/rules/index.d.ts b/src/rules/index.d.ts index 73e5ec1a..24157cc9 100644 --- a/src/rules/index.d.ts +++ b/src/rules/index.d.ts @@ -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'; @@ -33,6 +34,7 @@ export type Rules = Partial< ImportRules & JSDocRules & JsoncRules & + JsxA11yRules & NodeRules & NRules & PromiseRules &