Skip to content

Build your personal knowledge base with Trilium Notes

feat: Add prettier config (#165)

Alex9775a8b7c53f
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000000..da3a4a8e2e
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,14 @@
+{
+ "printWidth": 200,
+ "tabWidth": 4,
+ "useTabs": false,
+ "semi": true,
+ "singleQuote": true,
+ "quoteProps": "as-needed",
+ "trailingComma": "none",
+ "bracketSpacing": false,
+ "arrowParens": "always",
+ "proseWrap": "preserve",
+ "htmlWhitespaceSensitivity": "css",
+ "endOfLine": "lf"
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 9c9430d514..5e8ceecbfe 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,6 @@
{
- "editor.formatOnSave": true,
- "files.eol": "\n",
- "typescript.tsdk": "node_modules/typescript/lib"
+ "editor.formatOnSave": true,
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "files.eol": "\n",
+ "typescript.tsdk": "node_modules/typescript/lib"
}