eslint-config-ai

3.2.0 • Public • Published

eslint-config-ai

An opinionated set of ESLint shareable configs by Alex Ilyaev

Why?

I manage many projects and find myself copy/pasting configs between projects, which got out of hand pretty quickly.

What's included?

Installation

Required:

yarn add -D \
  prettier \
  eslint \
  eslint-config-prettier \
  @stylistic/eslint-plugin \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser \
  eslint-config-ai

Optional (based on the configs you choose):

yarn add -D \
  eslint-plugin-import \
  eslint-import-resolver-typescript \
  eslint-plugin-jest \
  eslint-plugin-lodash \
  eslint-plugin-promise \
  eslint-plugin-jsdoc \
  eslint-plugin-eslint-comments \
  eslint-plugin-compat \
  eslint-plugin-react \
  eslint-plugin-react-hooks \
  eslint-plugin-jsx-a11y
  • If you use npm, replace yarn add with npm install

Usage

Add to your .eslintrc:

Last

Disables styling rules that are covered by Prettier or deprecated and moved to @stylistic

Always add ai/last as the last extends

{
  "extends": ["ai/last"]
}

Base rules

This config extends eslint:recommended and sets up Prettier

{
  "extends": ["ai", "ai/last"]
}

Base + Plugins

You can choose which plugin to add

{
  "extends": [
    "ai",
    "ai/unicorn",
    "ai/import",
    "ai/jest",
    "ai/lodash",
    "ai/promise",
    "ai/jsdoc",
    "ai/eslint-comments",
    "ai/last"
  ]
}

Base + React

{
  "extends": ["ai", "ai/react", "ai/last"]
}

All (Base + Plugins + React + Last)

{
  "extends": ["ai/all"]
}

Configured Rules

You can see what's currently configured in these files:

Readme

Keywords

Package Sidebar

Install

npm i eslint-config-ai

Weekly Downloads

20

Version

3.2.0

License

MIT

Unpacked Size

30.1 kB

Total Files

24

Last publish

Collaborators

  • alexilyaev