@loongwoo/eslint-config-typescript-prettier

1.3.1 • Public • Published

eslint-config-typescript-prettier

🔧 ESLint configuration for TypeScript, using Prettier to format code.

If you need to format Vue code, you can use @loongwoo/eslint-config-vue.

use

  1. Install dependencies
pnpm add -D @loongwoo/eslint-config-typescript-prettier

#or
yarn add -D @loongwoo/eslint-config-typescript-prettier

# or
npm install --save-dev @loongwoo/eslint-config-typescript-prettier
  1. Configure ESLint
import tsPrettier from '@loongwoo/eslint-config-typescript-prettier';

/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
  ...tsPrettier,
  {
    files: ['*.ts', '*.tsx'],
    ignores: ['src/vite-env.d.ts'],
  },
];
  1. Open the package.json file and add the eslint command in the scripts configuration.
{
   "scripts": {
     "lint": "eslint . --fix"
   }
}

Package Sidebar

Install

npm i @loongwoo/eslint-config-typescript-prettier

Weekly Downloads

13

Version

1.3.1

License

ISC

Unpacked Size

2.16 kB

Total Files

3

Last publish

Collaborators

  • loong.woo