@anolilab/lint-staged-config
Version:
Shareable Lint-Staged Config for any project.
35 lines (31 loc) • 1.2 kB
TypeScript
import { Configuration } from 'lint-staged';
interface EslintConfig {
cache?: boolean;
config?: string;
extensions?: string[];
"fix-type"?: string[];
"max-warnings"?: number | string | false;
rules?: string[];
}
interface StylesheetsConfig {
extensions?: (typeof stylesheetsExtensions)[number][];
}
interface TypescriptConfig {
exclude?: string[];
extensions?: (typeof typescriptExtensions)[number][];
}
declare const eslintExtensions: readonly ["cjs", "js", "mjs", "cts", "ts", "mts", "yml", "yaml", "jsx", "tsx", "mdx", "toml", "json", "json5", "jsonc"];
declare const typescriptExtensions: readonly ["cts", "ts", "mts", "tsx", "ctsx"];
declare const stylesheetsExtensions: readonly ["css", "scss", "sass", "less", "styl", "stylus", "pcss", "postcss", "sss"];
declare const defineConfig: (options?: {
cwd?: string;
debug?: boolean;
eslint?: EslintConfig | false;
json?: false;
markdown?: false;
secretlint?: false;
stylesheets?: StylesheetsConfig | false;
tests?: false;
typescript?: TypescriptConfig | false;
}) => Configuration;
export { defineConfig, eslintExtensions, stylesheetsExtensions, typescriptExtensions };