@jimmy.codes/eslint-config
Version:
A simple, modern ESLint config that covers most use cases.
80 lines (79 loc) • 1.95 kB
JavaScript
//#region src/globs.ts
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
const GLOB_TS_EXT = "?([cm])ts";
const GLOB_TSX_EXT = "?([cm])tsx";
const GLOB_JS = "**/*.?([cm])js";
const GLOB_JSX = "**/*.?([cm])jsx";
const GLOB_CJS = "**/*.cjs";
const GLOB_TS = `**/*.${GLOB_TS_EXT}`;
const GLOB_TSX = `**/*.${GLOB_TSX_EXT}`;
const GLOB_ASTRO = "**/*.astro";
const GLOB_TESTS = [
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
`**/*.spec.${GLOB_SRC_EXT}`,
`**/*.test.${GLOB_SRC_EXT}`,
`**/*.bench.${GLOB_SRC_EXT}`,
`**/*.benchmark.${GLOB_SRC_EXT}`
];
const GLOB_TYPE_TESTS = [
`**/*.test-d.${GLOB_TS_EXT}`,
`**/*.test-d.${GLOB_TSX_EXT}`,
`**/*.spec-d.${GLOB_TS_EXT}`,
`**/*.spec-d.${GLOB_TSX_EXT}`
];
const GLOB_PLAYWRIGHT = [`**/e2e/**/*.spec.${GLOB_SRC_EXT}`, `**/e2e/**/*.test.${GLOB_SRC_EXT}`];
const GLOB_E2E = [
...GLOB_PLAYWRIGHT,
`**/cypress/**/*.spec.${GLOB_SRC_EXT}`,
`**/cypress/**/*.test.${GLOB_SRC_EXT}`
];
const GLOB_NEXTJS = [
GLOB_JS,
GLOB_JSX,
GLOB_TS,
GLOB_TSX
];
const GLOB_IGNORES = [
"**/node_modules",
"**/dist",
"**/package-lock.json",
"**/yarn.lock",
"**/pnpm-lock.yaml",
"**/bun.lockb",
"**/output",
"**/coverage",
"**/temp",
"**/.temp",
"**/tmp",
"**/.tmp",
"**/.history",
"**/.vitepress/cache",
"**/.nuxt",
"**/.next",
"**/.vercel",
"**/.changeset",
"**/.idea",
"**/.cache",
"**/.output",
"**/.vite-inspect",
"**/.yarn",
"**/storybook-static",
"**/.eslint-config-inspector",
"**/playwright-report",
"**/.astro",
"**/.vinxi",
"**/app.config.timestamp_*.js",
"**/.tanstack",
"**/.nitro",
"**/CHANGELOG*.md",
"**/*.min.*",
"**/LICENSE*",
"**/__snapshots__",
"**/auto-import?(s).d.ts",
"**/components.d.ts",
"**/vite.config.ts.*.mjs",
"**/*.gen.*",
"!.storybook"
];
//#endregion
export { GLOB_JS as a, GLOB_PLAYWRIGHT as c, GLOB_TSX as d, GLOB_TYPE_TESTS as f, GLOB_IGNORES as i, GLOB_TESTS as l, GLOB_CJS as n, GLOB_JSX as o, GLOB_E2E as r, GLOB_NEXTJS as s, GLOB_ASTRO as t, GLOB_TS as u };