Overview
While@zayne-labs/eslint-config works out of the box with zero configuration, it offers extensive customization options when you need them. This guide covers all the ways you can tailor the configuration to your project’s needs.
Factory Options
Thezayne() factory function accepts an options object to control which features are enabled and how they behave.
Basic Configuration
Ignore Patterns
.eslintignore is no longer supported in Flat config. Use the ignores option instead.ignores option in the factory is treated as global ignores and extends the config’s default ignores:
Gitignore Integration
By default, ESLint will parse your.gitignore file to determine what to ignore:
Stylistic Rules
Enable stylistic formatting rules for code consistency:- Simple Enable
- Custom Options
Disabling Optional Configs
Disable all optional configs at once, keeping only essentials:Language Support
Selectively enable or disable language support:Custom Rules
Pass additional configs as extra arguments to override or extend rules:Type-Aware Rules
Type-aware linting is automatically enabled when TypeScript is detected. It uses the nearesttsconfig.json by default.
- Single Custom Location
- Multiple TSConfigs
Advanced Composition
Import and compose fine-grained configs directly:View available config modules
View available config modules
Available config modules:
astro- Astro framework supportcomments- ESLint directive commentsdepend- Dependency management rulesexpo- React Native/Expo supportignores- Global ignore patternsimports- Import/export rulesjavascript- JavaScript rulesjsdoc- JSDoc comment rulesjsonc- JSON/JSONC supportjsx- JSX rulesmarkdown- Markdown file supportnode- Node.js rulesperfectionist- Code organization rulespnpm- PNPM catalog rulesreact- React framework rulessolid- Solid.js framework rulessortPackageJson- package.json sortingsortTsconfig- tsconfig.json sortingstylistic- Stylistic formatting rulestailwindcssBetter- Tailwind CSS rulestanstack- TanStack Query/Router rulestoml- TOML file supporttypescript- TypeScript rulesunicorn- Additional best practicesvue- Vue framework rulesyaml- YAML file support
Example Configurations
Monorepo Setup
Monorepo Setup
Strict TypeScript
Strict TypeScript
Test Files Configuration
Test Files Configuration
Next Steps
Framework Setup
Configure ESLint for React, Vue, Astro, Solid, and more
API Reference
View complete API documentation
