@gitopslovers/eslint-config-multistack
v1.16.2
Published
An ESLint plugin that provides opinionated preset configurations for multiple frameworks and libraries.
Downloads
1,501
Maintainers
Readme
eslint-config-multistack
Opinionated ESLint configuration presets for modern JavaScript and TypeScript frameworks.
Install it, choose a preset, and get a solid default ruleset for JavaScript, TypeScript, tests, security and common code-style decisions.
Why use it
- One package with reusable configuration presets
- Ready for ESLint flat configuration
- Best Practices in JavaScript, TypeScript and security
- Easy to extend with your own rules on top
Requirements
- Node
>= 24 - ESLint
>= 10.3.0
Installation
npm install --save-dev eslint @gitopslovers/eslint-config-multistackIf you use pnpm:
pnpm add -D eslint @gitopslovers/eslint-config-multistackQuick start
Create an eslint.config.mjs file and spread the preset you want to use.
import multistack from '@gitopslovers/eslint-config-multistack';
export default [
...multistack.configs.presetName(),
];Current presets
These are the presets currently available on the package:
| Preset | Description |
|-----------------------------------------|-----------------------------|
| multistack.configs.react() | React projects |
| multistack.configs.next() | Next projects |
| multistack.configs.angular() | Angular projects |
| multistack.configs.express() | Express and Node backends |
| multistack.configs.nestjs() | NestJS backends |
| multistack.configs.ionic(options) | Ionic projects |
| multistack.configs.tsLibrary(options) | TypeScript library projects |
Every preset accepts an optional options object with the following keys:
| Option | Type | Default | Description |
|------------|----------|-------------------|------------------------------------------------|
| tsconfig | string | 'tsconfig.json' | Path to your project's TypeScript config file. |
The tsLibrary, express, nestjs, angular and ionic presets also accepts:
| Option | Type | Default | Description |
|--------------|----------------------|------------|-----------------------------|
| testRunner | 'vitest' \| 'jest' | 'vitest' | Which test framework to use |
In addition, the ionic preset requires the frontend framework configuration option:
| Option | Type | Default | Description |
|--------------|----------------------------|------------|------------------------------------|
| framework | 'react' \| 'angular' | 'react' | Frontend framework used with Ionic |
Example:
import multistack from '@gitopslovers/eslint-config-multistack';
export default [
...multistack.configs.tsLibrary({ testRunner: 'jest', tsconfig: 'tsconfig.app.json' }),
...multistack.configs.react({ tsconfig: 'tsconfig.web.json' }),
];What is included in every preset
Every preset already bundles rules for:
- JavaScript best practices
- JSDoc
- Arrow function preference
- Regex optimization
- Security and secret detection
- Vitest or Jest on
*.test.*,*.spec.*,tests/**and__tests__/** - TypeScript best practices on
*.ts,*.tsx,*.mtsand*.cts
Customize it
Append your own configuration after the preset to override any rule.
import multistack from '@gitopslovers/eslint-config-multistack';
export default [
...multistack.configs.angular(),
{
rules: {
'no-console': 'off',
},
},
];License
MIT © GitOps Lovers
