This package provides a out of the box ESLint config based on Airbnb's ESLint config with TypeScript and Prettier support.
yarn
yarn add eslint-config-airbnb-ts-prettier -D
or npm
npm install eslint-config-airbnb-ts-prettier -D
or pnpm
pnpm install eslint-config-airbnb-ts-prettier -D
Add "extends": "airbnb-ts-prettier"
to your .eslintrc.*
file. Make sure to put it last, so it gets the chance to override other configs.
{ "extends": ["airbnb-ts-prettier"] }
Go to the VSCode > Preference > Settings
Then you will see these settings in your VSCode settings.json
.
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",