enso/app/modules.d.ts

75 lines
1.8 KiB
TypeScript
Raw Normal View History

/**
* @file Type definitions for modules that currently lack typings on DefinitelyTyped.
*
* This file MUST NOT `export {}` so that the modules are visible to other files.
*/
// ===========================
// === Module declarations ===
// ===========================
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
}
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
}
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-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
}
2024-07-26 09:34:51 +03:00
export const deprecatedRules: DeprecatedRules
2024-07-26 09:34:51 +03:00
const DEFAULT: Default
export default DEFAULT
}
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>
}
2024-07-26 09:34:51 +03:00
/** Configurations defined by this ESLint plugin. */
interface Configs {
readonly recommended: Config
}
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
}
2024-07-26 09:34:51 +03:00
/** The default export of this ESLint plugin. */
export interface Default {
readonly configs: Configs
readonly rules: ReactHooksRules
}
2024-07-26 09:34:51 +03:00
export const configs: Configs
export const rules: ReactHooksRules
2024-07-26 09:34:51 +03:00
const DEFAULT: Default
export default DEFAULT
}