Skip to content

Commit

Permalink
feat: setup prettier pour js, md et djlint pour njk IGNF#39
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed May 15, 2024
1 parent cf3c4a1 commit 87a3250
Show file tree
Hide file tree
Showing 9 changed files with 885 additions and 3,140 deletions.
9 changes: 9 additions & 0 deletions .djlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"format_css": false,
"format_js": false,
"max_line_length": "160",
"profile": "nunjucks",
"ignore": "H031",
"exclude": "node_modules,_site,.git",
"extension": ".njk"
}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**.njk
/package-lock.json
/yarn.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"tabWidth": 4,
"printWidth": 160,
"trailingComma": "es5",
"endOfLine": "auto",
"useTabs": false
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["ginfuru.better-nunjucks", "monosans.djlint"]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"emmet.includeLanguages": {
"nunjucks": "html"
},
"files.associations": {
"*.njk": "nunjucks"
},
"[nj][njk][nunjucks]": {
"editor.defaultFormatter": "monosans.djlint"
}
}
Loading

0 comments on commit 87a3250

Please sign in to comment.