1.0.1 • Published 1 year ago
eslint-config-airbnb-ts-prettier v1.0.1
eslint-config-airbnb-ts-prettier
This package provides a out of box ESLint config based on Airbnb's ESLint config with TypeScript and Prettier support.
Install
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
Update your ESLint
config
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"] }
VSCode
1. Install "Prettier" VSCode plugin - published by "Prettier"
2. Set "Prettier" as Default Code formatter.
Go to the VSCode > Preference > Settings
3. Enable "Format On Save"
Then you will see these settings in your VSCode settings.json
.
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",