Skip to content

Commit 367b088

Browse files
committed
Add a Prettier hook
1 parent d15e6d3 commit 367b088

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎.editorconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ indent_style = space
77
indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
max_line_length = 120
1011

1112
[*.md]
1213
trim_trailing_whitespace = false

‎.prettierignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock.json
2+
devenv.lock

‎.prettierrc‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎devenv.nix‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
};
1717
};
1818

19+
# Use the Prettier from node_modules. Prettier reads the line length from .editorconfig.
20+
prettier = {
21+
enable = true;
22+
settings.binPath = "./node_modules/.bin/prettier";
23+
};
24+
1925
# The hook list has no TypeScript hook, so the hook runs the npm script.
2026
tsc = {
2127
enable = true;

0 commit comments

Comments
 (0)