Skip to content

Commit

Permalink
Bump libraries to cover security issues. (#416)
Browse files Browse the repository at this point in the history
* Bump libraries to cover security issues.

* Node v22

* bump libs and fixed code style.

* Fixed linter
  • Loading branch information
ryanfox1985 authored Oct 9, 2024
1 parent 0297aca commit 37171f7
Show file tree
Hide file tree
Showing 13 changed files with 3,661 additions and 1,410 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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
}
}
}]
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<div class="image">
<a href="{{ .Permalink }}">
{{ if .Params.banner }}
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="">
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" />
{{ else }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="">
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="" />
{{ end }}
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ <h4>{{ i18n "recentPosts" }}</h4>
<div class="image same-height-always">
<a href="{{ .Permalink }}">
{{ if isset .Params "banner" }}
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="{{ .Title }}">
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="{{ .Title }}" />
{{ else }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="{{ .Title }}">
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="{{ .Title }}" />
{{ end }}
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/recent_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ <h2>{{ .Site.Params.recent_posts.title | markdownify }}</h2>
<div class="top">
<div class="image" style="overflow:hidden">
{{ if isset .Params "banner" }}
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" >
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" />
{{ else }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="">
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="" />
{{ end }}
</div>
<div class="bg"></div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/widgets/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 class="panel-title">{{ i18n "categoriesTitle" }}</h3>
<ul class="nav nav-pills nav-stacked">
{{ $current := . }}
{{ range $name, $items := .Site.Taxonomies.categories }}
<li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/categories/%s/") }} class="active"{{ end }}>
<li {{ if eq $current.RelPermalink ($name | urlize | lower | printf "/categories/%s/") }}class="active"{{ end }}>
<a href="{{ "categories/" | relLangURL }}{{ $name | urlize | lower }}">{{ $name | upper }} ({{ len $items }})</a>
</li>
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/widgets/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ <h3 class="panel-title">{{ i18n "searchTitle" }}</h3>
<div class="panel-body">
<form action="//google.com/search" method="get" accept-charset="UTF-8" role="search">
<div class="input-group">
<input type="search" name="q" class="form-control" placeholder="{{ i18n "searchTitle" }}">
<input type="hidden" name="sitesearch" value="{{ "/" | absURL }}">
<input type="search" name="q" class="form-control" placeholder="{{ i18n "searchTitle" }}" />
<input type="hidden" name="sitesearch" value="{{ "/" | absURL }}" />
<span class="input-group-btn">
<button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
</span>
Expand Down
Loading

0 comments on commit 37171f7

Please sign in to comment.