Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.04 KB

File metadata and controls

50 lines (35 loc) · 1.04 KB

Workspace: eslint-config

This package provides shared ESLint configurations.

Setup

Add the eslint-config package to your workspace dev dependencies.

pnpm --filter [workspace] add @template-react/eslint-config --save-dev

Usage

Add eslint-config to your .eslintrc config file.

{
  "root": true,
  "extends": "@template-react/eslint-config/vite"
}

The following configurations are available:

  • base - Base rules (includes parser config for TypeScript)
  • react - React rules (extends base config)
  • next - Next.js project default rules (extends react config)
  • storybook - Storybook project default rules (extends react config)
  • vite - Vite project default rules (extends react config)

Parser

  • TypeScript (included in base)

Configs

  • Prettier (included in next and vite)
  • Turbo (included in base)

Rule Plugins

  • Format.js
  • Import
  • Next.js
  • Promise
  • React
  • SonarJS
  • Storybook
  • Unicorn