@lehoczky/eslint-config-vue
v1.2.6
Published
ESLint Config for Vue3 with TypeScript
Downloads
94
Readme
Eslint Config Vue
ESLint configuration for Vue projects with TypeScript and prettier.
💿 Installation
Create a new project with vite:
pnpm create vite <app-name> --template vue-ts
cd <app-name>
Install the dependencies for the config:
pnpm add -D eslint prettier @lehoczky/eslint-config-vue
💻 Usage
.eslintrc.cjs
:
module.exports = {
root: true,
extends: ["@lehoczky/eslint-config-vue"],
}
Example command:
{
"scripts": {
"eslint:fix": "eslint . --ext .js,.ts,.vue --max-warnings=0 --fix"
}
}
🛠 TSConfig
If your tsconfig.json
file does not include every TypeScript and vue file in the project, you can create a new tsconfig.eslint.json
file and include every file in that.
This config will automatically use tsconfig.eslint.json
file if it finds one in the root of your repository:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true
},
"include": ["src/**/*.ts", "src/**/*.vue", "./*.ts"]
}