diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 283b67f..a261e3d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,9 +18,7 @@ ///// "editor.formatOnSave": true, "editor.foldingStrategy": "indentation", - "editor.rulers": [ - 80 - ], + "editor.rulers": [80], "files.eol": "\n", ///// // Language specific settings @@ -51,9 +49,7 @@ "editor.defaultFormatter": "golang.go" }, "go.lintTool": "golangci-lint", - "go.lintFlags": [ - "--fast" - ], + "go.lintFlags": ["--fast"], ///// // Tailwind CSS + NodX ///// @@ -61,14 +57,8 @@ "go": "go" }, "tailwindCSS.experimental.classRegex": [ - [ - "Class\\(([^)]*)\\)", - "[\"`]([^\"`]*)[\"`]" - ], // Class("...") or Class(`...`) - [ - "ClassMap\\{([^)]*)\\}", - "[\"`]([^\"`]*)[\"`]" - ] // ClassMap{"..."} or ClassMap{`...`} + ["Class\\(([^)]*)\\)", "[\"`]([^\"`]*)[\"`]"], // Class("...") or Class(`...`) + ["ClassMap\\{([^)]*)\\}", "[\"`]([^\"`]*)[\"`]"] // ClassMap{"..."} or ClassMap{`...`} ] } } diff --git a/.github/workflows/lint-test-build.yaml b/.github/workflows/lint-test-build.yaml index 4add10b..4a93554 100644 --- a/.github/workflows/lint-test-build.yaml +++ b/.github/workflows/lint-test-build.yaml @@ -14,10 +14,11 @@ jobs: lint-test-build: strategy: matrix: - vars: [ - { os: ubuntu-24.04, platform: linux/amd64 }, - { os: ubuntu-24.04-arm, platform: linux/arm64 }, - ] + vars: + [ + { os: ubuntu-24.04, platform: linux/amd64 }, + { os: ubuntu-24.04-arm, platform: linux/arm64 }, + ] name: Lint, test, and build the code runs-on: ${{ matrix.vars.os }} diff --git a/.github/workflows/publish-docker-image.yaml b/.github/workflows/publish-docker-image.yaml index 75511b2..93c3c2d 100644 --- a/.github/workflows/publish-docker-image.yaml +++ b/.github/workflows/publish-docker-image.yaml @@ -22,10 +22,11 @@ jobs: build-and-push-images: strategy: matrix: - vars: [ - { os: ubuntu-24.04, platform: amd64 }, - { os: ubuntu-24.04-arm, platform: arm64 }, - ] + vars: + [ + { os: ubuntu-24.04, platform: amd64 }, + { os: ubuntu-24.04-arm, platform: arm64 }, + ] name: Build and push images runs-on: ${{ matrix.vars.os }} diff --git a/.vscode/project.code-snippets b/.vscode/project.code-snippets index 17a2898..ea52556 100644 --- a/.vscode/project.code-snippets +++ b/.vscode/project.code-snippets @@ -1,34 +1,22 @@ { "If error return error": { "prefix": "rerr", - "body": [ - "if err != nil {", - "\treturn err", - "}", - "" - ], - "description": "Inserts code to check for error and return it" + "body": ["if err != nil {", "\treturn err", "}", ""], + "description": "Inserts code to check for error and return it", }, "Get request context": { "prefix": "grcr", // Get Request Context Request - "body": [ - "ctx := c.Request().Context()" - ], - "description": "Get's the request from echo context" + "body": ["ctx := c.Request().Context()"], + "description": "Get's the request from echo context", }, "Get request echo context": { "prefix": "grce", // Get Request Context Echo - "body": [ - "reqCtx := reqctx.GetCtx(c)" - ], - "description": "Inserts code to get echo context from a request" + "body": ["reqCtx := reqctx.GetCtx(c)"], + "description": "Inserts code to get echo context from a request", }, "Get both request and echo context": { "prefix": "grcb", // Get Request Context Both - "body": [ - "ctx := c.Request().Context()", - "reqCtx := reqctx.GetCtx(c)" - ], - "description": "Inserts code to get both request and echo context" + "body": ["ctx := c.Request().Context()", "reqCtx := reqctx.GetCtx(c)"], + "description": "Inserts code to get both request and echo context", }, -} \ No newline at end of file +} diff --git a/internal/view/static/js/init-helpers.js b/internal/view/static/js/init-helpers.js index ea0a51c..c839446 100644 --- a/internal/view/static/js/init-helpers.js +++ b/internal/view/static/js/init-helpers.js @@ -56,7 +56,7 @@ export function initHelpers() { function textareaAutoGrow(element) { if (!element?.style) return; element.style.height = "1px"; - element.style.height = (element.scrollHeight + 2) + "px"; + element.style.height = element.scrollHeight + 2 + "px"; } function formatJson(inJSON) { diff --git a/internal/view/web/component/options_dropdown.inc.js b/internal/view/web/component/options_dropdown.inc.js index 9e39290..4d832ab 100644 --- a/internal/view/web/component/options_dropdown.inc.js +++ b/internal/view/web/component/options_dropdown.inc.js @@ -32,8 +32,7 @@ window.alpineOptionsDropdown = function () { const buttonRect = this.buttonEl.getBoundingClientRect(); const contentHeight = this.contentEl.offsetHeight; const windowHeight = window.innerHeight; - const moreSpaceBelow = - (windowHeight - buttonRect.bottom) > buttonRect.top; + const moreSpaceBelow = windowHeight - buttonRect.bottom > buttonRect.top; this.contentEl.style.left = `${buttonRect.left}px`; diff --git a/internal/view/web/layout/dashboard_aside.inc.js b/internal/view/web/layout/dashboard_aside.inc.js index 5fcf3ec..7d2df25 100644 --- a/internal/view/web/layout/dashboard_aside.inc.js +++ b/internal/view/web/layout/dashboard_aside.inc.js @@ -4,13 +4,10 @@ document.addEventListener("DOMContentLoaded", function () { if (!el) return; - const saveScrollPosition = window.debounce( - () => { - const scrollPosition = el.scrollTop; - localStorage.setItem(key, scrollPosition); - }, - 200, - ); + const saveScrollPosition = window.debounce(() => { + const scrollPosition = el.scrollTop; + localStorage.setItem(key, scrollPosition); + }, 200); el.addEventListener("scroll", saveScrollPosition); const scrollPosition = localStorage.getItem(key); diff --git a/scripts/build-js.ts b/scripts/build-js.ts index 5220da8..aa334c8 100644 --- a/scripts/build-js.ts +++ b/scripts/build-js.ts @@ -47,8 +47,7 @@ async function prebuildIncludedFiles() { try { const alpineFiles = await glob(alpineGlob); - let outFileContent = - `// This file is auto-generated by ${__filename}. DO NOT EDIT.\n\n`; + let outFileContent = `// This file is auto-generated by ${__filename}. DO NOT EDIT.\n\n`; for (const file of alpineFiles) { const content = await fse.readFile(file, "utf-8"); diff --git a/scripts/sqlc-prebuild.ts b/scripts/sqlc-prebuild.ts index 04346e6..7810498 100644 --- a/scripts/sqlc-prebuild.ts +++ b/scripts/sqlc-prebuild.ts @@ -5,9 +5,7 @@ import { fileURLToPath } from "node:url"; import fse from "fs-extra"; import { glob } from "glob"; -const sourceGlobs = [ - "./internal/service/**/*.sql", -]; +const sourceGlobs = ["./internal/service/**/*.sql"]; const outputFilePath = "./internal/database/dbgen/queries.gen.sql"; @@ -39,8 +37,7 @@ try { } // Lee cada archivo y los concatena en un solo string - let outFileContent = - `-- This file is auto-generated by ${__filename}. DO NOT EDIT.\n\n`; + let outFileContent = `-- This file is auto-generated by ${__filename}. DO NOT EDIT.\n\n`; for (const fileName of files) { let content = await fse.readFile(fileName, "utf-8"); content = prefixQueriesWithFileName(content, fileName);