From 37171f71c2380cbbba7962b46916e2258420edeb Mon Sep 17 00:00:00 2001 From: Guillermo Guerrero Date: Thu, 10 Oct 2024 00:30:47 +0200 Subject: [PATCH] Bump libraries to cover security issues. (#416) * Bump libraries to cover security issues. * Node v22 * bump libs and fixed code style. * Fixed linter --- .eslintignore | 4 - .eslintrc.yml | 6 - .github/workflows/eslint.yml | 2 +- eslint.config.mjs | 29 + 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 | 4902 ++++++++++++++++------ package.json | 14 +- static/js/front.js | 54 +- static/js/gmaps.init.js | 42 +- 13 files changed, 3661 insertions(+), 1410 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/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index bf903ab4a..0d0f6a753 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 22 # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..a7994e02e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,29 @@ +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: ['**/js/gmaps.init.js', '**/*.min.js', '**/owl.*.js', '**/jquery.*.js', '**/hpneo.*.js'] +}, ...compat.extends('standard'), { + plugins: { + standard, + promise + }, + languageOptions: { + globals: { + ...globals.jquery + } + } +}] 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" }}