@shayanthenerd/eslint-config
Version:
A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style
46 lines • 1.96 kB
text/typescript
import { PluginRules, RuleOptions } from "../eslintRules.mjs";
import { ConfigWithOverrides } from "../index.mjs";
//#region src/types/options/typescript.d.ts
type ConfigRules = PluginRules<'@typescript-eslint'>;
interface TypescriptOptions extends ConfigWithOverrides<ConfigRules> {
/**
* Globs of files to allow running with the default project compiler options despite not being matched by the project service (_tsconfig.json_).
*
* The matched files may not also be included in their nearest _tsconfig.json_ file.
*
* New items extend the defaults instead of overriding them.
*
* @default ['{prettier,eslint}.config.?([mc])ts']
*
* @see [@typescript-eslint: `allowDefaultProject` option](https://typescript-eslint.io/packages/parser#allowdefaultproject)
*/
allowedDefaultProjects?: string[];
/**
* Enforce the consistent use of either `method` or `property` syntax for method signatures.
*
* @default 'method'
*
* @see [@typescript-eslint/method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
*/
methodSignatureStyle?: RuleOptions<'@typescript-eslint/method-signature-style'>;
/**
* Automatically remove unused imports (requires `@typescript-eslint/no-unused-vars`).
*
* If set to `false`, unused imports will only be reported.
*
* @default false
*
* @see [@typescript-eslint/no-unused-vars: `enableAutofixRemoval.imports` option](https://typescript-eslint.io/rules/no-unused-vars/#enableautofixremovalimports)
*/
removeUnusedImports?: boolean;
/**
* Enforce the consistent use of either `interface` or `type` for type definitions.
*
* @default 'interface'
*
* @see [@typescript-eslint/consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
*/
typeDefinitionStyle?: RuleOptions<'@typescript-eslint/consistent-type-definitions'>;
}
//#endregion
export type { TypescriptOptions };