Skip to content

Commit

Permalink
add extends and settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Apr 26, 2023
1 parent ab7bc91 commit 190da3d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/config/extends/eslint-plugin-testing-library.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Eslint TestingLibrary extensions.
*
* @see [Eslint TestingLibrary extensions](https://github.com/testing-library/eslint-plugin-testing-library)
*/
export type TestingLibraryExtensions =
| 'plugin:testing-library/angular'
| 'plugin:testing-library/dom'
| 'plugin:testing-library/marko'
| 'plugin:testing-library/react'
| 'plugin:testing-library/vue';
2 changes: 2 additions & 0 deletions src/config/extends/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { PromiseExtensions } from './eslint-plugin-promise';
import type { ReactExtensions } from './eslint-plugin-react';
import type { ReactHooksExtensions } from './eslint-plugin-react-hooks';
import type { SonarjsExtensions } from './eslint-plugin-sonarjs';
import type { TestingLibraryExtensions } from './eslint-plugin-testing-library';
import type { UnicornExtensions } from './eslint-plugin-unicorn';
import type { VitestExtensions } from './eslint-plugin-vitest';
import type { VueExtensions } from './eslint-plugin-vue';
Expand All @@ -39,6 +40,7 @@ export type KnownExtensions = LiteralUnion<
| ReactExtensions
| ReactHooksExtensions
| SonarjsExtensions
| TestingLibraryExtensions
| TypescriptEslintExtensions
| UnicornExtensions
| VitestExtensions
Expand Down
1 change: 1 addition & 0 deletions src/config/plugin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type Plugin = LiteralUnion<
| 'react'
| 'sonarjs'
| 'spellcheck'
| 'testing-library'
| 'unicorn'
| 'vitest'
| 'vue'
Expand Down
24 changes: 24 additions & 0 deletions src/config/settings/testing-library.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { LiteralUnion } from '../../utility-types';

/**
* Testing Library settings.
*
* @see [Testing Library settings](https://github.com/testing-library/eslint-plugin-testing-library)
*/
export interface TestingLibrarySettings
extends Partial<Record<string, unknown>> {
/**
* @see [testing-library/custom-queries](https://github.com/testing-library/eslint-plugin-testing-library#testing-librarycustom-queries)
*/
'testing-library/custom-queries'?: 'off' | string[];

/**
* @see [testing-library/custom-renders](https://github.com/testing-library/eslint-plugin-testing-library#testing-librarycustom-renders)
*/
'testing-library/custom-renders'?: 'off' | string[];

/**
* @see [testing-library/utils-module](https://github.com/testing-library/eslint-plugin-testing-library#testing-libraryutils-module)
*/
'testing-library/utils-module'?: LiteralUnion<'off'>;
}
2 changes: 2 additions & 0 deletions src/rules/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { ReactHooksRules } from './react-hooks';
import type { RuleConfig } from './rule-config';
import type { SonarJSRules } from './sonarjs';
import type { SpellcheckRules } from './spellcheck';
import type { TestingLibraryRules } from './testing-library';
import type { TypeScriptRules } from './typescript-eslint';
import type { UnicornRules } from './unicorn';
import type { VitestRules } from './vitest';
Expand Down Expand Up @@ -42,6 +43,7 @@ export type Rules = Partial<
ReactRules &
SonarJSRules &
SpellcheckRules &
TestingLibraryRules &
TypeScriptRules &
UnicornRules &
VitestRules &
Expand Down

0 comments on commit 190da3d

Please sign in to comment.