Skip to content

Commit 654a489

Browse files
committed
ENH: Update pre-commit config to ensure "build_dependencies" is split
Add support to enable use of `prettier-plugin-multiline-arrays` plugin. References: * https://www.npmjs.com/package/prettier-plugin-multiline-arrays
1 parent 91793bc commit 654a489

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ repos:
1717
rev: "v3.5.3"
1818
hooks:
1919
- id: prettier
20-
types_or: [yaml, json]
20+
types_or: [yaml, javascript, json]
21+
additional_dependencies:
22+
23+
2124

2225
- repo: https://github.com/Lucas-C/pre-commit-hooks
2326
rev: v1.5.5

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const config = {
2+
// Allow Prettier in .pre-commit-config.yaml to find plugins.
3+
// https://github.com/prettier/prettier/issues/15085
4+
plugins: [
5+
require.resolve("prettier-plugin-multiline-arrays"),
6+
],
7+
multilineArraysWrapThreshold: 0,
8+
};
9+
module.exports = config;

scripts/check_filenames.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ unexpected_files=$(find . -mindepth 1 \( -type d \( \
2121
-path ./scripts \
2222
\) -o -type f \( \
2323
-name .pre-commit-config.yaml -o \
24+
-name .prettierrc.js -o \
2425
-name .git-blame-ignore-revs -o \
2526
-name README.md -o \
2627
-name "*.json" \

0 commit comments

Comments
 (0)