@quic-pro/eslint-config

0.3.1 • Public • Published

@quic-pro/eslint-config

Shareable ESLint config.

Installation

# Using npm
npm install --save-dev @quic-pro/eslint-config

# Using yarn
yarn add --dev @quic-pro/eslint-config

Required ESLint version >= 8

ESLint documentation

Configs

Available configs:

Use the recommended config with other configs.

Usage

default

  1. Add to your ESLint config:

    {
      "extends": [
        "@quic-pro/eslint-config"
      ]
    }

    Or you can also omit the eslint-config and it will be automatically assumed by ESLint:

    {
      "extends": [
        "@quic-pro"
      ]
    }

recommended

  1. Add to your ESLint config:

    {
      "extends": [
        "@quic-pro/eslint-config/recommended"
      ]
    }

typescript

  1. Install required dependencies:

    #Using npm
    npm install --save-dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
    
    # Using yarn
    yarn add --dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser

    Required versions:
    typescript >= 4
    @typescript-eslint/eslint-plugin >= 5
    @typescript-eslint/parser >= 5

  2. Add to your ESLint config:

    {
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "ecmaVersion": "latest",
        "sourceType": "module",
        "project": "./tsconfig.json"
      },
      "extends": [
        "@quic-pro/eslint-config/recommended",
        "@quic-pro/eslint-config/typescript"
      ]
    }

react

  1. Install required dependencies:

    # Using npm
    npm install --save-dev eslint-config-react-app eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort
    
    # Using yarn
    yarn add --dev eslint-config-react-app eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort

    Required versions:
    eslint-config-react-app >= 7
    eslint-plugin-jsx-a11y >= 6
    eslint-plugin-react >= 7
    eslint-plugin-react-hooks >= 4
    eslint-plugin-simple-import-sort >= 8

  2. Add to your ESLint config:

    {
      "extends": [
        "@quic-pro/eslint-config/recommended",
        "@quic-pro/eslint-config/react"
      ]
    }

    If you are using TypeScript with React then you can also add "@quic-pro/eslint-config/typescript". See instructions above.

License

MIT

Package Sidebar

Install

npm i @quic-pro/eslint-config

Weekly Downloads

1

Version

0.3.1

License

MIT

Unpacked Size

11.1 kB

Total Files

7

Last publish

Collaborators

  • kosrotoff
  • dev-quic-pro