mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-02-18 03:18:27 -06:00
Run formatter
This commit is contained in:
@@ -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{`...`}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
9
.github/workflows/lint-test-build.yaml
vendored
9
.github/workflows/lint-test-build.yaml
vendored
@@ -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 }}
|
||||
|
||||
9
.github/workflows/publish-docker-image.yaml
vendored
9
.github/workflows/publish-docker-image.yaml
vendored
@@ -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 }}
|
||||
|
||||
30
.vscode/project.code-snippets
vendored
30
.vscode/project.code-snippets
vendored
@@ -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",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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`;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user