Run formatter

This commit is contained in:
Luis Eduardo
2025-09-27 16:37:57 +00:00
parent 9004f04498
commit e0c1670394
9 changed files with 32 additions and 60 deletions

View File

@@ -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{`...`}
]
}
}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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",
},
}
}

View File

@@ -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) {

View File

@@ -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`;

View File

@@ -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);

View File

@@ -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");

View File

@@ -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);