/eslint-config

A set of JavaScript linter and formatter configs

Primary LanguageJavaScriptMIT LicenseMIT

eslint-config

ESLint config based on Airbnb with added prettier integration.

npm version Node.js CI License: MIT

Installation

  • npm i -D @k.sh/eslint-config or yarn add --dev @k.sh/eslint-config

Usage

Prettier

  • Create a .prettierrc.js file:
module.exports = require('@k.sh/eslint-config/prettier');

ESLint

  • Update .eslintrc.json file:
{
  "extends": ["@k.sh/eslint-config"],
  "overrides": [
    {
      "files": ["**/*.ts", "**/*.tsx"],
      "extends": ["@k.sh/eslint-config/typescript"],
      "parserOptions": {
        "project": "./tsconfig.json"
      }
    }
  ]
}

Typescript

  • Update tsconfig.json file:
{
  "extends": "@k.sh/eslint-config/typescript/config.json"
}