2.0.0 โ€ข Published 2 years ago

eslint-config-vamp v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

๐Ÿ“– Table of Contents

๐Ÿ”ซ Overview

This package includes ESLint configuration files, this configuration files only include rules to prevent environment problems and conflicts with other rules.

Currently, there is 2 configurations:

  1. javascript - the default one that includes ESLint rules only
  2. typescript - includes typescript/eslint rules only

๐Ÿ› ๏ธ Installation

npm i -D eslint-config-vamp

โšก๏ธ Usage

javascript

The javascript configuration requires only eslint package to be installed.

.eslintrc.json

{
  "extends": [
    "vamp/javascript"
  ]
}

Example of advanced configuration with javascript:

Packages required:

  • eslint
  • eslint-config-prettier

.eslintrc.json

{
  "extends": [
    "eslint:recommended",
    "vamp/javascript",
    "prettier"
  ]
}

typescript

The typescript configuration require those packages in order to work:

  • eslint
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser

.eslintrc.json

{
  "extends": [
    "vamp/javascript",
    "vamp/typescript"
  ]
}

Example of advanced configuration with typescript:

Packages required:

  • eslint
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • prettier

.eslintrc.json

{
  "extends": [
    "eslint:recommended",
    "vamp/javascript",
    "plugin:@typescript-eslint/recommended",
    "vamp/typescript",
    "prettier"
  ]
}

Annoying Rules

All the rules considered as best practices but some of them can make to your existing projects problems, so those rules can be disabled easily with the rules object:

{
  "rules": {
    "id-length": "off",
    "max-classes-per-file": "off",
    "max-depth": "off",
    "max-nested-callbacks": "off",
    "max-params": "off"
  }
}

๐Ÿ“œ License

MIT