@tabula/eslint-config
v1.0.0
Published
Configuration for the ESLint
Downloads
272
Maintainers
Readme
@tabula/eslint-config
This package provides ESLint configurators as shared configs.
Rules
We use recommended rules from the following packages:
We add support of React for browser:
We add support of testing tools:
Also, we add our opinionated rules configuration on top of it.
Installation
Use the package manager pnpm to install @tabula/eslint-config
.
pnpm add @tabula/eslint-config --save-dev
Usage
The package provides utilities to build flat config, also configs and presets, which can be used for build your own configuration.
The defineConfig
utility accepts record with config definitions. Each definition is a ESLint flat config itself, or
object with files
, ignores
and configs
fields.
It's function build flat config with defined names to improve debug and readability.
import { defineConfig } from '@tabula/eslint-config';
export default defineConfig({
typescript: {
files: ['{src,stories}/**/*.{ts,tsx}'],
ignores: ['src/**/*.js'],
configs: presets.typescript(),
},
stories: {
files: ['stories/**/*.{ts,tsx}'],
rules: {
'react/no-multi-comp': 'off',
},
}
});
Also package exports configs
and presets
objects, which provide of single configs or configs list.
License
This project is ISC licensed.