Commit 3c44bb9fdc978e15008dc8ba3fb468b6ddece257

Authored by Henry Schreiner
Committed by Henry Schreiner
1 parent 6887978e

chore: add prettier to styling

.editorconfig
@@ -2,10 +2,12 @@ root = true @@ -2,10 +2,12 @@ root = true
2 2
3 [*] 3 [*]
4 indent_style = space 4 indent_style = space
5 -indent_size = 4  
6 insert_final_newline = true 5 insert_final_newline = true
7 end_of_line = lf 6 end_of_line = lf
8 trim_trailing_whitespace = true 7 trim_trailing_whitespace = true
9 8
  9 +[*.cpp,*.hpp,*.py]
  10 +indent_size = 4
  11 +
10 [*.yml] 12 [*.yml]
11 indent_size = 2 13 indent_size = 2
.pre-commit-config.yaml
@@ -2,63 +2,76 @@ ci: @@ -2,63 +2,76 @@ ci:
2 autoupdate_commit_msg: "chore(deps): pre-commit.ci autoupdate" 2 autoupdate_commit_msg: "chore(deps): pre-commit.ci autoupdate"
3 autofix_commit_msg: "style: pre-commit.ci fixes" 3 autofix_commit_msg: "style: pre-commit.ci fixes"
4 4
5 -  
6 repos: 5 repos:
7 -- repo: https://github.com/psf/black  
8 - rev: 22.3.0  
9 - hooks:  
10 - - id: black 6 + - repo: https://github.com/psf/black
  7 + rev: 22.3.0
  8 + hooks:
  9 + - id: black
  10 +
  11 + - repo: https://github.com/pre-commit/pre-commit-hooks
  12 + rev: v4.2.0
  13 + hooks:
  14 + - id: check-added-large-files
  15 + - id: check-case-conflict
  16 + - id: check-merge-conflict
  17 + - id: check-symlinks
  18 + - id: check-yaml
  19 + - id: end-of-file-fixer
  20 + - id: mixed-line-ending
  21 + - id: trailing-whitespace
11 22
12 -- repo: https://github.com/pre-commit/pre-commit-hooks  
13 - rev: v4.2.0  
14 - hooks:  
15 - - id: check-added-large-files  
16 - - id: check-case-conflict  
17 - - id: check-merge-conflict  
18 - - id: check-symlinks  
19 - - id: check-yaml  
20 - - id: end-of-file-fixer  
21 - - id: mixed-line-ending  
22 - - id: trailing-whitespace 23 + - repo: https://github.com/pre-commit/mirrors-clang-format
  24 + rev: v14.0.3
  25 + hooks:
  26 + - id: clang-format
  27 + types_or: [c++, c, cuda]
23 28
24 -- repo: https://github.com/pre-commit/mirrors-clang-format  
25 - rev: v14.0.3  
26 - hooks:  
27 - - id: clang-format  
28 - types_or: [c++, c, cuda] 29 + - repo: https://github.com/cheshirekow/cmake-format-precommit
  30 + rev: v0.6.13
  31 + hooks:
  32 + - id: cmake-format
  33 + additional_dependencies: [pyyaml]
29 34
30 -- repo: https://github.com/cheshirekow/cmake-format-precommit  
31 - rev: v0.6.13  
32 - hooks:  
33 - - id: cmake-format  
34 - additional_dependencies: [pyyaml] 35 + - repo: https://github.com/pre-commit/mirrors-prettier
  36 + rev: "v2.6.2"
  37 + hooks:
  38 + - id: prettier
  39 + types_or: [yaml, markdown, html, css, scss, javascript, json]
35 40
36 -- repo: https://github.com/markdownlint/markdownlint  
37 - rev: v0.11.0  
38 - hooks:  
39 - - id: markdownlint  
40 - args: ["--style=scripts/mdlint_style.rb"] 41 + - repo: https://github.com/markdownlint/markdownlint
  42 + rev: v0.11.0
  43 + hooks:
  44 + - id: markdownlint
  45 + args: ["--style=scripts/mdlint_style.rb"]
41 46
42 -- repo: local  
43 - hooks:  
44 - - id: remarklint  
45 - name: remarklint  
46 - language: node  
47 - entry: remark  
48 - types: [markdown]  
49 - args: ["--frail", "--quiet"]  
50 - additional_dependencies: [remark, remark-lint, remark-cli, remark-preset-lint-recommended, remark-lint-list-item-indent, remark-lint-no-undefined-references] 47 + - repo: local
  48 + hooks:
  49 + - id: remarklint
  50 + name: remarklint
  51 + language: node
  52 + entry: remark
  53 + types: [markdown]
  54 + args: ["--frail", "--quiet"]
  55 + additional_dependencies:
  56 + [
  57 + remark,
  58 + remark-lint,
  59 + remark-cli,
  60 + remark-preset-lint-recommended,
  61 + remark-lint-list-item-indent,
  62 + remark-lint-no-undefined-references,
  63 + ]
51 64
52 -- repo: local  
53 - hooks:  
54 - - id: disallow-caps  
55 - name: Disallow improper capitalization  
56 - language: pygrep  
57 - entry: PyBind|Numpy|Cmake|CCache|PyTest|Github  
58 - exclude: .pre-commit-config.yaml 65 + - repo: local
  66 + hooks:
  67 + - id: disallow-caps
  68 + name: Disallow improper capitalization
  69 + language: pygrep
  70 + entry: PyBind|Numpy|Cmake|CCache|PyTest|Github
  71 + exclude: .pre-commit-config.yaml
59 72
60 -- repo: https://github.com/codespell-project/codespell  
61 - rev: v2.1.0  
62 - hooks:  
63 - - id: codespell  
64 - args: ["-L", "atleast,ans,doub,inout"] 73 + - repo: https://github.com/codespell-project/codespell
  74 + rev: v2.1.0
  75 + hooks:
  76 + - id: codespell
  77 + args: ["-L", "atleast,ans,doub,inout"]