Kaynağa Gözat

feat(prettier): add `prettier` config

Joe 1 yıl önce
ebeveyn
işleme
395b7302cb

+ 1 - 0
.config/.gitignore

@@ -8,5 +8,6 @@
 !jonathandarker/
 !lazydocker/
 !lazygit/
+!prettier/
 !tmux/
 !zsh/

+ 6 - 0
.config/prettier/.gitignore

@@ -0,0 +1,6 @@
+# ignore everything...
+/*
+!.gitignore
+# ...except for these:
+!ignore
+!config

+ 23 - 0
.config/prettier/config

@@ -0,0 +1,23 @@
+### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
+# config
+# 
+# Docs: https://prettier.io/docs/en/configuration.html
+### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
+proseWrap: always
+htmlWhitespaceSensitivity: ignore
+overrides:
+  - files: "*.html"
+    options:
+        htmlWhitespaceSensitivity: "strict"
+  - files: "*.md"
+    options:
+      proseWrap: "always"
+  - files: "*.svelte"
+    options:
+      svelteStrictMode: true
+  - files: "*.jinja.html"
+    options:
+      parser: "jinja-template"
+  - files: "*.svg"
+    options:
+      parser: "xml"

+ 36 - 0
.config/prettier/ignore

@@ -0,0 +1,36 @@
+### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
+# ignore
+#
+# Docs: https://prettier.io/docs/en/ignore.html#ignoring-files-prettierignore
+# 
+# This should exclude all non-formattable extensions, so that Prettier can be
+# configured to run on every file, provided that the `--ignore-path` argument is
+# passed to the CLI.
+### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
+*
+!*/
+!.prettierrc
+!*.html
+!*.htm
+!*.css
+!*.scss
+!*.less
+!*.js
+!*.jsx
+!*.ts
+!*.tsx
+!*.json
+!*.yml
+!*.yaml
+!*.flow
+!*.vue
+!*.svelte
+!*.md
+!*.xml
+!*.svg
+!*.toml
+!*.nginx
+!*.conf
+!*.nginxconf
+!*.properties
+

+ 4 - 0
.github/README.md

@@ -51,6 +51,10 @@ simple terminal UI for both docker and docker-compose.
 Configuration for [lazygit](https://github.com/jesseduffield/lazygit/), a simple
 terminal UI for git commands.
 
+### [prettier (`~/.config/prettier/`)](./.config/prettier/)
+
+Configuration for [Prettier](http://prettier.io), an opinionated code formatter.
+
 ### [tmux (`~/.config/tmux/`)](./.config/tmux/)
 
 Configuration for [tmux](https://github.com/tmux/tmux), a terminal multiplexer.