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' {
|
2024-07-26 09:34:51 +03:00
|
|
|
/** An ESLint configuration. */
|
|
|
|
interface Config {
|
|
|
|
readonly plugins: string[]
|
|
|
|
readonly rules: Record<string, number>
|
|
|
|
readonly parserOptions: object
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** Configurations defined by this ESLint plugin. */
|
|
|
|
interface Configs {
|
|
|
|
readonly recommended: Config
|
|
|
|
readonly all: Config
|
|
|
|
readonly 'jsx-runtime': Config
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** Deprecated rules contained in this ESLint plugin. */
|
|
|
|
interface DeprecatedRules {
|
|
|
|
readonly 'jsx-sort-default-props': object
|
|
|
|
readonly 'jsx-space-before-closing': object
|
|
|
|
}
|
2024-03-07 05:20:21 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** The default export of this ESLint plugin. */
|
|
|
|
export interface Default {
|
|
|
|
readonly rules: Record<string, object>
|
|
|
|
readonly configs: Configs
|
|
|
|
readonly deprecatedRules: DeprecatedRules
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
export const deprecatedRules: DeprecatedRules
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
const DEFAULT: Default
|
|
|
|
export default DEFAULT
|
2023-07-06 14:52:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
declare module 'eslint-plugin-react-hooks' {
|
2024-07-26 09:34:51 +03:00
|
|
|
/** An ESLint configuration. */
|
|
|
|
interface Config {
|
|
|
|
readonly plugins: string[]
|
|
|
|
readonly rules: Record<string, string>
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** Configurations defined by this ESLint plugin. */
|
|
|
|
interface Configs {
|
|
|
|
readonly recommended: Config
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** Rules defined by this ESLint plugin. */
|
|
|
|
interface ReactHooksRules {
|
|
|
|
readonly 'rules-of-hooks': object
|
|
|
|
readonly 'exhaustive-deps': object
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
/** The default export of this ESLint plugin. */
|
|
|
|
export interface Default {
|
|
|
|
readonly configs: Configs
|
|
|
|
readonly rules: ReactHooksRules
|
|
|
|
}
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
export const configs: Configs
|
|
|
|
export const rules: ReactHooksRules
|
2023-07-06 14:52:32 +03:00
|
|
|
|
2024-07-26 09:34:51 +03:00
|
|
|
const DEFAULT: Default
|
|
|
|
export default DEFAULT
|
2023-03-15 06:42:14 +03:00
|
|
|
}
|