eslint-config-airbnb-ts-prettier

1.0.1 • Public • Published

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

Set Prettier as Default Code formatter.

3. Enable "Format On Save"

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",

Success

Package Sidebar

Install

npm i eslint-config-airbnb-ts-prettier

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

162 kB

Total Files

9

Last publish

Collaborators

  • alexshan2008