From a5ac454dcfb7c720ce2b09a06374248923a18b9b Mon Sep 17 00:00:00 2001
From: Lucas Brandstaetter <lucas@brandstaetter.tech>
Date: Tue, 29 Oct 2024 18:46:23 +0100
Subject: [PATCH] Add prettier

* Add package json with yarn and prettier
* Add prettier configuration
* Ignore files that are covered by djLint
* modify editorconfig to match prettier
---
 .editorconfig   | 15 ++++++---------
 .gitattributes  |  4 ++++
 .gitignore      | 10 ++++++++++
 .prettierignore | 11 +++++++++++
 .prettierrc     |  1 +
 package.json    |  7 +++++++
 yarn.lock       | 23 +++++++++++++++++++++++
 7 files changed, 62 insertions(+), 9 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 .prettierignore
 create mode 100644 .prettierrc
 create mode 100644 package.json
 create mode 100644 yarn.lock

diff --git a/.editorconfig b/.editorconfig
index bfeb6df95..e62e4cc5f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,18 +2,15 @@
 root = true
 
 [*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
 charset = utf-8
-trim_trailing_whitespace = true
 insert_final_newline = true
+end_of_line = lf
+indent_style = space
+max_line_length = 120
+trim_trailing_whitespace = true
 
 [*.md]
 trim_trailing_whitespace = false
 
-[*.{css,html,js,scss,j2}]
-indent_size = 2
-
-[*.yml]
-indent_size = 2
+[*.py]
+indent_size = 4
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..af3ad1281
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+/.yarn/**            linguist-vendored
+/.yarn/releases/*    binary
+/.yarn/plugins/**/*  binary
+/.pnp.*              binary linguist-generated
diff --git a/.gitignore b/.gitignore
index 47f6a8a33..f0b4232c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,3 +108,13 @@ dmypy.json
 
 # Cython debug symbols
 cython_debug/
+
+# yarn
+.pnp.*
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+# SDKS are excluded as we do not want them in the repository
+# !.yarn/sdks
+!.yarn/versions
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..a62db468f
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,11 @@
+**/*.html
+**/*.j2
+
+static.dist/
+**/vendor/**/*
+**/list_script.js
+
+src/core/fixtures/local/**/*
+
+src/plainui/static/hub.*
+src/plainui/static/plainui/js/player.js
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1 @@
+{}
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..4c0532e0b
--- /dev/null
+++ b/package.json
@@ -0,0 +1,7 @@
+{
+  "name": "hub",
+  "packageManager": "yarn@4.5.0",
+  "devDependencies": {
+    "prettier": "^3.3.3"
+  }
+}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 000000000..068de79e3
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,23 @@
+# This file is generated by running "yarn install" inside your project.
+# Manual changes might be lost - proceed with caution!
+
+__metadata:
+  version: 8
+  cacheKey: 10c0
+
+"hub@workspace:.":
+  version: 0.0.0-use.local
+  resolution: "hub@workspace:."
+  dependencies:
+    prettier: "npm:^3.3.3"
+  languageName: unknown
+  linkType: soft
+
+"prettier@npm:^3.3.3":
+  version: 3.3.3
+  resolution: "prettier@npm:3.3.3"
+  bin:
+    prettier: bin/prettier.cjs
+  checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26
+  languageName: node
+  linkType: hard
-- 
GitLab