UNPKG

@refinist/eslint-config

Version:
114 lines (113 loc) 4.27 kB
import { Arrayable, Config } from "./types-CwfoInxS.js"; import tseslint from "typescript-eslint"; import pluginVue from "eslint-plugin-vue"; import pluginPrettier from "eslint-plugin-prettier"; import pluginIgnore from "eslint-config-flat-gitignore"; import pluginPrettierRecommended from "eslint-plugin-prettier/recommended"; import pluginStylistic from "@stylistic/eslint-plugin"; import pluginBetterTailwindcss from "eslint-plugin-better-tailwindcss"; import configJs from "@eslint/js"; import * as parserVue from "vue-eslint-parser"; import { Linter } from "eslint"; //#region src/configs/ignores.d.ts declare const ignores: () => Config[]; //#endregion //#region src/configs/javascript.d.ts declare const restrictedSyntaxJs: string[]; declare const javascript: () => Config[]; //#endregion //#region src/configs/prettier.d.ts declare const prettier: () => Config[]; //#endregion //#region src/configs/stylistic.d.ts declare const stylistic: () => Config[]; //#endregion //#region src/configs/tailwindcss.d.ts type TailwindcssOptionsBase = { /** * tailwindcss 3: the path to the tailwind config file (eg: `tailwind.config.js`) * * @default 'tailwind.config.js' */ tailwindConfig?: string; /** * tailwindcss 4: the path to the entry file of the css based tailwind config (eg: `src/global.css`) * * @default 'src/global.css' */ entryPoint?: string; /** * files to apply tailwindcss rules * * @default [GLOB_JS, GLOB_JSX, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_HTML] */ files?: string[]; [key: string]: any; }; type TailwindcssOptions = (TailwindcssOptionsBase & { tailwindConfig: string; }) | (TailwindcssOptionsBase & { entryPoint: string; }); declare const tailwindcss: ({ tailwindConfig, entryPoint, files }: TailwindcssOptions) => Config[]; //#endregion //#region src/configs/typescript.d.ts declare const typescriptCore: ({ typeAware }?: { typeAware?: boolean; }) => Config[]; declare const typescript: ({ typeAware }?: { typeAware?: boolean; }) => Config[]; //#endregion //#region src/configs/vue.d.ts declare const reactivityTransform: () => Config[]; declare const vue: () => Config[]; //#endregion //#region src/env.d.ts declare const hasTypeScript: () => boolean; declare const hasVue: () => boolean; declare const hasReact: () => boolean; //#endregion //#region src/globs.d.ts declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)"; declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)"; declare const GLOB_JS = "**/*.?([cm])js"; declare const GLOB_JSX = "**/*.?([cm])jsx"; declare const GLOB_TS = "**/*.?([cm])ts"; declare const GLOB_TSX = "**/*.tsx"; declare const GLOB_STYLE = "**/*.{c,le,sc}ss"; declare const GLOB_CSS = "**/*.css"; declare const GLOB_LESS = "**/*.less"; declare const GLOB_SCSS = "**/*.scss"; declare const GLOB_JSON = "**/*.json"; declare const GLOB_JSON5 = "**/*.json5"; declare const GLOB_JSONC = "**/*.jsonc"; declare const GLOB_MARKDOWN = "**/*.md"; declare const GLOB_VUE = "**/*.vue"; declare const GLOB_YAML = "**/*.y?(a)ml"; declare const GLOB_HTML = "**/*.htm?(l)"; declare const GLOB_ASTRO_TS = "**/*.astro/*.ts"; declare const GLOB_ALL_SRC: string[]; declare const GLOB_NODE_MODULES: "**/node_modules"; declare const GLOB_DIST: "**/dist"; declare const GLOB_LOCKFILE: string[]; declare const GLOB_EXCLUDE: string[]; declare const GLOB_TAILWINDCSS: string[]; //#endregion //#region src/presets.d.ts interface Options { vue?: boolean; prettier?: boolean; tailwindcss?: TailwindcssOptions; } declare function refinist(options?: Options, ...userConfigs: Arrayable<Config | Linter.Config>[]): Config[]; //#endregion export { Arrayable, Config, GLOB_ALL_SRC, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TAILWINDCSS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, Options, TailwindcssOptions, configJs, hasReact, hasTypeScript, hasVue, ignores, javascript, parserVue, pluginBetterTailwindcss, pluginIgnore, pluginPrettier, pluginPrettierRecommended, pluginStylistic, pluginVue, prettier, reactivityTransform, refinist, restrictedSyntaxJs, stylistic, tailwindcss, tseslint, typescript, typescriptCore, vue };