Skip to content

Commit 683c7fc

Browse files
authored
Add CSS files to the paths the hook is run on (#3)
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.
1 parent 729ac68 commit 683c7fc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.pre-commit-hooks.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
entry: biome ci --files-ignore-unknown=true --no-errors-on-unmatched
44
language: node
55
types: [text]
6-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$"
6+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$"
77
- id: biome-check
88
name: biome check
99
entry: biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
1010
language: node
1111
types: [text]
12-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$"
12+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$"
1313
- id: biome-format
1414
name: biome format
1515
entry: biome format --write --files-ignore-unknown=true --no-errors-on-unmatched
1616
language: node
1717
types: [text]
18-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$"
18+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$"
1919
- id: biome-lint
2020
name: biome lint
2121
entry: biome lint --write --files-ignore-unknown=true --no-errors-on-unmatched
2222
language: node
2323
types: [text]
24-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$"
24+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ repos:
4646
entry: npx biome check --apply --files-ignore-unknown=true --no-errors-on-unmatched
4747
language: system
4848
types: [text]
49-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?)$"
49+
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css)$"
5050
```
5151

5252
The pre-commit option `files` is optional,

0 commit comments

Comments
 (0)