1.0.12 • Published 12 months ago

@sergiogc9/eslint-config v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

npm.io npm.io

Eslint personal config

Table of contents

Configurations available

This package contains some different eslint configurations:

  • @sergiogc9/eslint-config:

    Contains the base rules for typescript and javascript with the recommended ones together with airbnb rules, as well as with prettier rules.

  • @sergiogc9/eslint-config/react:

    Contains react specific rules together with react hooks rules defined by Airbnb. React v16.8 must be used at least.

  • @sergiogc9/eslint-config/jest:

    Contains settings related to jest testing. Don't use it if not using jest.

  • @sergiogc9/eslint-config/all:

    Contains all the available configurations together.

Installation

Install package

Using yarn:

yarn add -D @sergiogc9/eslint-config

Using npm:

npm install -D @sergiogc9/eslint-config

Peer dependencies

Install all needed plugins and configs:

npx install-peerdeps --dev @sergiogc9/eslint-config

ℹ️ The command above will install all needed dependencies from all eslint configs. If you don't use react, jest or don't want to install some of these configs, install only dependencies related to each package:

  • Dependencies for base config (and the others config):
yarn add -D \
    eslint \
    @typescript-eslint/eslint-plugin \
    eslint-plugin-eslint-comments \
    eslint-plugin-import \
    eslint-plugin-prettier \
    prettier
  • Dependencies for react config:
yarn add -D \
    eslint-plugin-jsx-a11y \
    eslint-plugin-react \
    eslint-plugin-react-hooks
  • Dependencies for jest config:
yarn add -D eslint-plugin-jest

Usage

Add the wanted configuration(s) inside the .eslintrc file in extends option:

{
    ...,
    extends: [
        "other_config",
        "@sergiogc9/eslint-config"
    ]
}

E.g. if you want react rules but not jest ones:

{
    ...,
    extends: [
        "other_config",
        "@sergiogc9/eslint-config",
        "@sergiogc9/eslint-config/react"
    ]
}

E.g. if you want all rules available in this package:

{
    ...,
    extends: [
        "other_config",
        "@sergiogc9/eslint-config/all"
    ]
}
1.0.11

12 months ago

1.0.12

12 months ago

1.0.9

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago