From 8304836be189ff79ddbae337b9a4dbd473ad6052 Mon Sep 17 00:00:00 2001 From: Guillermo Guerrero Date: Thu, 10 Oct 2024 00:22:04 +0200 Subject: [PATCH] bump libs and fixed code style. --- .eslintignore | 4 - .eslintrc.yml | 6 - eslint.config.mjs | 30 + layouts/_default/list.html | 4 +- layouts/partials/footer.html | 4 +- layouts/partials/recent_posts.html | 4 +- layouts/partials/widgets/categories.html | 2 +- layouts/partials/widgets/search.html | 4 +- package-lock.json | 3565 ++++++++++++++++++++-- package.json | 10 +- static/js/front.js | 54 +- static/js/gmaps.init.js | 24 +- 12 files changed, 3311 insertions(+), 400 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.yml create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 2780efd0f..000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -**/*.min.js -**/owl.*.js -**/jquery.*.js -**/hpneo.*.js diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index a3f524b4e..000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,6 +0,0 @@ -extends: standard -plugins: - - standard - - promise -env: - jquery: true diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..02858e9c0 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,30 @@ +import standard from "eslint-plugin-standard"; +import promise from "eslint-plugin-promise"; +import globals from "globals"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: ["eslint.config.mjs", "**/*.min.js", "**/owl.*.js", "**/jquery.*.js", "**/hpneo.*.js"], +}, ...compat.extends("standard"), { + plugins: { + standard, + promise, + }, + + languageOptions: { + globals: { + ...globals.jquery, + }, + }, +}]; \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4bfe2069c..1063747ea 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,9 +31,9 @@
{{ if .Params.banner }} - + {{ else }} - + {{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index b0e6eb09d..c6f54b446 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -24,9 +24,9 @@

{{ i18n "recentPosts" }}

{{ if isset .Params "banner" }} - {{ .Title }} + {{ .Title }} {{ else }} - {{ .Title }} + {{ .Title }} {{ end }}
diff --git a/layouts/partials/recent_posts.html b/layouts/partials/recent_posts.html index 5add1e877..e7551e1a8 100644 --- a/layouts/partials/recent_posts.html +++ b/layouts/partials/recent_posts.html @@ -22,9 +22,9 @@

{{ .Site.Params.recent_posts.title | markdownify }}

{{ if isset .Params "banner" }} - + {{ else }} - + {{ end }}
diff --git a/layouts/partials/widgets/categories.html b/layouts/partials/widgets/categories.html index 0dfc929f4..4b0bdfff7 100644 --- a/layouts/partials/widgets/categories.html +++ b/layouts/partials/widgets/categories.html @@ -11,7 +11,7 @@

{{ i18n "categoriesTitle" }}