@lehoczky/eslint-config-vue
v2.0.3
Published
ESLint Config for Vue3 with TypeScript
Downloads
351
Readme
Eslint Config Vue
ESLint configuration for Vue projects with TypeScript. Supports prettier by default.
💿 Installation
Create a new project with vite:
pnpm create vite <app-name> --template vue-ts
cd <app-name>
Install eslint and the config:
pnpm add -D eslint @lehoczky/eslint-config-vue
💻 Usage
With Type Checking
eslint.config.mjs
:
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"
/** @type {import("eslint").Linter.Config[]} */
export default configLehoczkyVue({
parserOptionsForTypeChecking: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
})
See more: typescript-eslint | Linting with Type Information
Without Type Checking
import { configLehoczkyTypescript } from "@lehoczky/eslint-config-typescript"
/** @type {import("eslint").Linter.Config[]} */
export default configLehoczkyVue()
📢 Commands
package.json
:
{
"scripts": {
"eslint:check": "eslint --max-warnings=0",
"eslint:fix": "eslint --max-warnings=0 --fix"
}
}