pickstack

Vue + Husky + lint-staged

Git pre-commit hook that lints and formats staged files. This page shows exactly what pickstack adds to a Vue project for Husky + lint-staged: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework vue --modules eslint,husky-lint-staged --yes
Customize in the configurator

Packages it adds

PackageVersionType
@vue/eslint-config-typescript^14.9.0dev
eslint^10.15.0dev
eslint-plugin-vue^10.12.1dev
husky^9.1.7dev
jiti^2.7.0dev
lint-staged^17.6.2dev
vue-eslint-parser^10.4.2dev

New files

.husky/pre-commit
lint-staged
eslint.config.ts
import { globalIgnores } from "eslint/config";
import {
  defineConfigWithVueTs,
  vueTsConfigs,
} from "@vue/eslint-config-typescript";
import pluginVue from "eslint-plugin-vue";

export default defineConfigWithVueTs(
  {
    name: "app/files-to-lint",
    files: ["**/*.{vue,ts,mts,tsx}"],
  },
  globalIgnores(["**/dist/**", "**/dist-ssr/**", "**/coverage/**"]),
  ...pluginVue.configs["flat/essential"],
  vueTsConfigs.recommended,
);

Project files

Related templates