0.1.2-alpha.1 • Published 1 year ago

@avolantis/eslint-config-typescript v0.1.2-alpha.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@avolantis/eslint-config-typescript

npm

Extends @avolantis/eslint-config with typescript support, using typescript-eslint. Use this preset as a base for typescript projects.

Install

Make sure that typescript@^4.6.3 is installed in the project.\ Run the following commands using pnpm at your project root:

pnpm add -D eslint prettier @avolantis/eslint-config-typescript @avolantis/prettier-config

Use -WD instead, if running in a workspace root

Create an .eslintrc.{js,json,yml,yaml} file (preferably at workspace root):

# .eslintrc.yaml
root: true
parserOptions:
  project: path/to/tsconfig.json

# If you only have typescript files
extends: "@avolantis/eslint-config-typescript"

# Or apply config only to ts files
overrides:
  - files: "**/*.ts"
    extends: "@avolantis/eslint-config-typescript"

Then modify your package.json (at workspace root):

{
  "scrips": {
    "lint": "eslint --fix ."
  },
  "prettier": "@avolantis/prettier-config"
}