Skip to content

Commit 99b1049

Browse files
authored
fix: enable prettier pre commit check on jsonc files (SchemaStore#4573)
* fix: enable prettier pre commit check on jsonc files Enable the pre commit prettier check on jsonc files by enabling it for all files which identify as text. Disable always run as passing no files would just error. * chore: enable color in pre commit hook Enable color in pre commit hook as it has no impact on action but when run locally allows the user to see the issue more readily.
1 parent fd8a173 commit 99b1049

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ repos:
44
rev: 'v3.5.3'
55
hooks:
66
- id: 'prettier'
7-
# TODO: Add 'jsonc' so 'src/schema-validation.jsonc' is checked in CI
8-
# Error: "Type tag 'jsonc' is not recognized. Try upgrading identify and pre-commit?"
9-
types_or: ['yaml', 'json', 'javascript', 'css', 'markdown']
10-
always_run: true
7+
types: [text]
118
additional_dependencies:
129
1310
1411
1512
pass_filenames: true
1613
args:
1714
[
18-
'--no-color',
1915
'--log-level=warn',
20-
'--write',
16+
'--check',
2117
'--config=.prettierrc.cjs',
2218
'--ignore-path=.gitignore',
2319
]

0 commit comments

Comments
 (0)