@loongwoo/eslint-config-typescript-prettier
v1.3.1
Published
ESLint configuration for TypeScript, using Prettier to format code.
Downloads
12
Maintainers
Readme
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
- 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
- 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'],
},
];
- Open the
package.json
file and add theeslint
command in thescripts
configuration.
{
"scripts": {
"lint": "eslint . --fix"
}
}