@bastidood/eslint-config
v0.7.1
Published
Strict baseline ESLint configuration generated from @bastidood/oxlint-config.
Downloads
2,044
Readme
@bastidood/eslint-config
ESLint port of @bastidood/oxlint-config for projects that Oxlint cannot lint, such as Svelte and Astro.
Installation
pnpm add --save-dev @bastidood/eslint-config eslint typescriptConfiguration
// eslint.config.ts
import { compose } from '@bastidood/eslint-config';
import { CORE } from '@bastidood/eslint-config/core';
import { defineConfig } from 'eslint/config';
export default defineConfig({
files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'],
extends: compose(CORE),
});List CORE first in compose() and include other presets that apply to the same files in that call. This combines their no-restricted-* lists.
If you also lint Astro, add ignores: ['**/*.astro/**'] to this block to exclude Astro's virtual scripts. Import ASTRO from @bastidood/eslint-config-astro and add a separate block with files: ['**/*.astro', '**/*.astro/*.{js,ts}'] and extends: compose(ASTRO).
Entry Points
| Entry point | Contents |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| @bastidood/eslint-config | compose |
| @bastidood/eslint-config/core | ESLint core, import, jsdoc, promise, @typescript-eslint, and unicorn rules |
| @bastidood/eslint-config/node | Node.js rules |
| @bastidood/eslint-config/vitest | Vitest rules |
| @bastidood/eslint-config/tanstack/query | Enables the slopstopper TanStack Query rules: prefer-query-key-context, no-defaulted-query-key, no-standalone-mutate-async, and no-mutate-callback-cache-update |
| @bastidood/eslint-config/tanstack/table | Enables the slopstopper TanStack Table rules: prefer-table-atoms, require-table-state-pairs, no-render-scoped-table-schema, and require-exclusive-indeterminate; bans stockFeatures and reading column templates outside FlexRender |
Limitations
- Prefer
@bastidood/oxlint-configwherever Oxlint can run. - Rules are not configurable. Supply only project-specific settings, such as
filesand globals. typescript-eslintsupports TypeScript up to 6.0. On TypeScript 7, aliastypescriptto@typescript/typescript6.- Requires ESLint 10.
- Run ESLint from the directory that contains
tsconfig.jsonor a parent directory. Type-aware rules search fortsconfig.jsononly up to the working directory.
