Ctrl K
ComunidadGuías…

lefthook.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Git hooks manager. Commands run sequentially in the order below.
# eslint --fix runs first, then prettier --write, so formatting always wins.
# stage_fixed re-stages files the tools modified, so fixes land in the commit.
#
# eslint runs from the repo root, and a flat config is resolved from the working
# directory, so without v10_config_lookup_from_file every staged file would be
# linted with the root config instead of the one in its own app or package.
pre-commit:
  commands:
    eslint:
      priority: 1
      glob: '*.{js,jsx,ts,tsx,mjs,cjs}'
      run: bunx eslint --flag v10_config_lookup_from_file --fix --no-warn-ignored {staged_files}
      stage_fixed: true
    prettier:
      priority: 2
      glob: '*.{js,jsx,ts,tsx,mjs,cjs,json,jsonc,css,scss,md,mdx,yml,yaml,html}'
      run: bunx prettier --ignore-unknown --write {staged_files}
      stage_fixed: true