@lehoczky/eslint-config-vue
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

Eslint Config Vue

npm version

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"]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @lehoczky/eslint-config-vue

Weekly Downloads

31

Version

1.2.5

License

MIT

Unpacked Size

6.67 kB

Total Files

5

Last publish

Collaborators

  • lehoczky