ESLint (and Prettier) config

npm version NPM downloads Code Style Prettier MIT License Twitter Follow

These are settings for ESLint.

What it does

This setup lints your TypeScript code based on practices. Feel free to override the rules that make sense for you.

Installing

  1. In your project folder, run:
npx install-peerdeps --dev eslint-config-twg
  1. You will see several dependencies were installed. Now, create (or update) a .eslintrc file with the following content:
{
  "extends": "eslint-config-twg/typescript.js",
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}
  1. Then make or update a tsconfig.json file:
{
  "extends": "eslint-config-twg/tsconfig.json",
  "include": [
    "**/*"
  ]
}
  1. Add prettier config @twgdev/prettier-config