Skip to content

ReTable/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a1f2099 · Nov 18, 2024
Nov 18, 2024
Oct 13, 2024
Oct 11, 2024
Oct 29, 2024
Oct 16, 2024
Oct 13, 2024
Oct 13, 2024
Oct 11, 2024
Oct 13, 2024
Oct 11, 2024
Oct 13, 2024
Oct 29, 2024
Nov 18, 2024
Oct 11, 2024
Nov 18, 2024
Oct 13, 2024
Nov 18, 2024
Nov 18, 2024
Oct 11, 2024
Oct 13, 2024

Repository files navigation

@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

You can use npm or yarn too.

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.