Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
/ eslint-config Public archive

A set of JavaScript linter and formatter configs

License

Notifications You must be signed in to change notification settings

karolis-sh/eslint-config

Repository files navigation

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"
}