@dhi-gras/eslint-config-ts
v2.0.7-debug03
Published
![npm (scoped)](https://img.shields.io/npm/v/@dhi-gras/eslint-config-ts) ![npm](https://img.shields.io/npm/dw/@dhi-gras/eslint-config-ts) ![Maintenance](https://img.shields.io/maintenance/yes/2022)
Downloads
72
Readme
ESLint config for TS projects
Linting rules to be used in JavaScript / ES projects.
Installation
yarn add -D @dhi-gras/eslint-config-ts @dhi-gras/eslint-config-react @typescript-eslint/eslint-plugin eslint-plugin-radar eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks prettier eslint-plugin-prettier eslint-plugin-eslint-comments eslint-plugin-json
If you're not using React, omit @dhi-gras/eslint-config-react eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
Extensions
If you're using VSCode, install the ESLint extension.
Add to your VSCode settings.json
:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
}
ESLint can also be used in other editors and in CLI.
Linting and formatting should work without installing the Prettier extension, but only in ES/JS/TS files.
Setup
Add to package.json
"eslintConfig": {
"extends": [
"@dhi-gras/react",
"@dhi-gras/ts"
]
},
If you're not using React, omit "@dhi-gras/react"