2024-10-24 10:38:08 +03:00
|
|
|
/**
|
|
|
|
* @file Type definitions for modules that currently lack typings on DefinitelyTyped.
|
2023-03-15 06:42:14 +03:00
|
|
|
*
|
2024-10-24 10:38:08 +03:00
|
|
|
* This file MUST NOT `export {}` so that the modules are visible to other files.
|
|
|
|
*/
|
2023-03-15 06:42:14 +03:00
|
|
|
|
2023-05-19 22:55:29 +03:00
|
|
|
// ===========================
|
|
|
|
// === Module declarations ===
|
|
|
|
// ===========================
|
|
|
|
|
2023-07-06 14:52:32 +03:00
|
|
|
declare module 'eslint-plugin-react' {
|
|
|
|
/** An ESLint configuration. */
|
|
|
|
interface Config {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly plugins: string[]
|
|
|
|
readonly rules: Record<string, number>
|
|
|
|
readonly parserOptions: object
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Configurations defined by this ESLint plugin. */
|
|
|
|
interface Configs {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly recommended: Config
|
|
|
|
readonly all: Config
|
|
|
|
readonly 'jsx-runtime': Config
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Deprecated rules contained in this ESLint plugin. */
|
|
|
|
interface DeprecatedRules {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly 'jsx-sort-default-props': object
|
|
|
|
readonly 'jsx-space-before-closing': object
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
2024-03-07 05:20:21 +03:00
|
|
|
|
2023-07-06 14:52:32 +03:00
|
|
|
/** The default export of this ESLint plugin. */
|
2023-09-22 06:43:25 +03:00
|
|
|
export interface Default {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly rules: Record<string, object>
|
|
|
|
readonly configs: Configs
|
|
|
|
readonly deprecatedRules: DeprecatedRules
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export const deprecatedRules: DeprecatedRules
|
|
|
|
|
|
|
|
const DEFAULT: Default
|
|
|
|
export default DEFAULT
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module 'eslint-plugin-react-hooks' {
|
|
|
|
/** An ESLint configuration. */
|
|
|
|
interface Config {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly plugins: string[]
|
|
|
|
readonly rules: Record<string, string>
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Configurations defined by this ESLint plugin. */
|
|
|
|
interface Configs {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly recommended: Config
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Rules defined by this ESLint plugin. */
|
|
|
|
interface ReactHooksRules {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly 'rules-of-hooks': object
|
|
|
|
readonly 'exhaustive-deps': object
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/** The default export of this ESLint plugin. */
|
2023-09-22 06:43:25 +03:00
|
|
|
export interface Default {
|
2024-02-07 14:26:59 +03:00
|
|
|
readonly configs: Configs
|
|
|
|
readonly rules: ReactHooksRules
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export const configs: Configs
|
|
|
|
export const rules: ReactHooksRules
|
|
|
|
|
|
|
|
const DEFAULT: Default
|
|
|
|
export default DEFAULT
|
2023-03-15 06:42:14 +03:00
|
|
|
}
|