From a147b20df9119c6b83fdb0577a988320448c4215 Mon Sep 17 00:00:00 2001 From: Jeppe Fihl-Pearson Date: Wed, 12 Jun 2024 16:09:07 +0100 Subject: [PATCH] Add CSS files to the paths the hook is run on Biome 1.8.0 added support for linting and formatting CSS files. This adds CSS files to the list of file extensions that are passed to Biome via the pre-commit hook. --- .pre-commit-hooks.yaml | 8 ++++---- README.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index ed4838c..564afd7 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -3,22 +3,22 @@ entry: biome ci --files-ignore-unknown=true --no-errors-on-unmatched language: node types: [text] - files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$" - id: biome-check name: biome check entry: biome check --write --files-ignore-unknown=true --no-errors-on-unmatched language: node types: [text] - files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$" - id: biome-format name: biome format entry: biome format --write --files-ignore-unknown=true --no-errors-on-unmatched language: node types: [text] - files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$" - id: biome-lint name: biome lint entry: biome lint --write --files-ignore-unknown=true --no-errors-on-unmatched language: node types: [text] - files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$" diff --git a/README.md b/README.md index b1739b4..2798743 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ repos: entry: npx biome check --apply --files-ignore-unknown=true --no-errors-on-unmatched language: system types: [text] - files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$" + files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$" ``` The pre-commit option `files` is optional,