Frontend: Upgrade ESLint from v8.57.0 to v9.23.0

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-03-26 21:07:45 +01:00
parent 858130da9c
commit 62eff7c4c3
9 changed files with 908 additions and 1415 deletions

43
NOTICE
View File

@@ -9,7 +9,7 @@ The following 3rd-party software packages may be used by or distributed with
PhotoPrism. Any information relevant to third-party vendors listed below are
collected using common, reasonable means.
Date generated: 2025-03-23
Date generated: 2025-03-26
================================================================================
@@ -2316,8 +2316,8 @@ SOFTWARE.
--------------------------------------------------------------------------------
Package: github.com/golang/geo
Version: v0.0.0-20250321002858-2bb09a976f49
License: Apache-2.0 (https://github.com/golang/geo/blob/2bb09a976f49/LICENSE)
Version: v0.0.0-20250324010448-bc23e40121c4
License: Apache-2.0 (https://github.com/golang/geo/blob/bc23e40121c4/LICENSE)
Apache License
@@ -6069,8 +6069,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
Package: github.com/zitadel/logging
Version: v0.6.1
License: Apache-2.0 (https://github.com/zitadel/logging/blob/v0.6.1/LICENSE)
Version: v0.6.2
License: Apache-2.0 (https://github.com/zitadel/logging/blob/v0.6.2/LICENSE)
Apache License
Version 2.0, January 2004
@@ -6277,8 +6277,8 @@ License: Apache-2.0 (https://github.com/zitadel/logging/blob/v0.6.1/LICENSE)
--------------------------------------------------------------------------------
Package: github.com/zitadel/oidc/v3/pkg
Version: v3.36.1
License: Apache-2.0 (https://github.com/zitadel/oidc/blob/v3.36.1/LICENSE)
Version: v3.37.0
License: Apache-2.0 (https://github.com/zitadel/oidc/blob/v3.37.0/LICENSE)
Apache License
Version 2.0, January 2004
@@ -6485,8 +6485,8 @@ License: Apache-2.0 (https://github.com/zitadel/oidc/blob/v3.36.1/LICENSE)
--------------------------------------------------------------------------------
Package: github.com/zitadel/schema
Version: v1.3.0
License: BSD-3-Clause (https://github.com/zitadel/schema/blob/v1.3.0/LICENSE)
Version: v1.3.1
License: BSD-3-Clause (https://github.com/zitadel/schema/blob/v1.3.1/LICENSE)
Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
@@ -7929,8 +7929,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
Package: gopkg.in/photoprism/go-tz.v2/tz
Version: v2.1.3
License: MIT (https://github.com/photoprism/go-tz/blob/v2.1.3/tz/LICENSE)
Version: v2.2.0
License: MIT (https://github.com/photoprism/go-tz/blob/v2.2.0/tz/LICENSE)
MIT License
@@ -8245,8 +8245,8 @@ axios MIT Matt Zabriskie
axios-mock-adapter MIT Colin Timmermans <colintimmermans@gmail.com>
babel-loader MIT Luis Couto <hello@luiscouto.pt>
babel-plugin-istanbul BSD-3-Clause Thai Pangsakulyanont @dtinth
babel-plugin-polyfill-corejs3 MIT n/a
browserslist MIT Andrey Sitnik <andrey@sitnik.ru>
chai MIT Jake Luer <jake@alogicalparadox.com>
cheerio MIT Matt Mueller <mattmuelle@gmail.com>
chrome-finder ISC gwuhaolin
core-js MIT Denis Pushkarev zloirock@zloirock.ru http://zloirock.ru
@@ -8254,36 +8254,17 @@ cross-env MIT Kent C. Dodds <me@kentcdodds.com
css-loader MIT Tobias Koppers @sokra
cssnano MIT Ben Briggs beneb.info@gmail.com http://beneb.info
easygettext MIT Polyconseil
eslint MIT Nicholas C. Zakas <nicholas+npm@nczconsulting.com>
eslint-config-prettier MIT Simon Lydell
eslint-formatter-pretty MIT Sindre Sorhus sindresorhus@gmail.com https://sindresorhus.com
eslint-plugin-html ISC n/a
eslint-plugin-import MIT Ben Mosher <me@benmosher.com>
eslint-plugin-node MIT Toru Nagashima
eslint-plugin-prettier MIT Teddy Katz
eslint-plugin-promise ISC jden <jason@denizac.org>
eslint-plugin-vue MIT Toru Nagashima (https://github.com/mysticatea)
eslint-plugin-vuetify MIT Kael Watts-Deuchar <kaelwd@gmail.com>
eslint-webpack-plugin MIT Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>
eventsource-polyfill MIT amvtek <devel@amvtek.com>
file-loader MIT Tobias Koppers @sokra
file-saver MIT Eli Grey <me@eligrey.com>
floating-vue MIT Guillaume Chau <guillaume.b.chau@gmail.com>
hls.js Apache-2.0 n/a
i MIT Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (pksunkara.github.com)
karma MIT Vojta Jína <vojta.jina@gmail.com>
karma-chrome-launcher MIT Vojta Jina <vojta.jina@gmail.com>
karma-coverage-istanbul-reporter MIT Matt Lewis
karma-htmlfile-reporter MIT Matthias Schuetz MatthiasSchuetz@gmx.de
karma-mocha MIT Vojta Jina <vojta.jina@gmail.com>
karma-verbose-reporter MIT Pier Fumagalli pier@usrz.com
karma-webpack MIT Tobias Koppers @sokra
luxon MIT Isaac Cambron
maplibre-gl BSD-3-Clause n/a
memoize-one MIT Alex Reardon <alexreardon@gmail.com>
mini-css-extract-plugin MIT Tobias Koppers @sokra
minimist MIT James Halliday mail@substack.net http://substack.net
mocha MIT TJ Holowaychuk <tj@vision-media.ca>
node-storage-shim ISC Michael Nahkies
passive-events-support MIT Ignas Damunskis <ignas3run@gmail.com>
photoswipe MIT Dmytro Semenov (https://dimsemenov.com)

View File

@@ -1,14 +0,0 @@
coverage/
node_modules/
tests/screenshots/
tests/acceptance/screenshots/
tests/upload-files/
*.html
.idea
.github
.tmp
.local
.cache
.var
!**/.eslintrc.js

View File

@@ -1,108 +0,0 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
mocha: true,
},
extends: [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:prettier/recommended",
"plugin:vue/base",
"plugin:vuetify/base",
],
settings: {
"prettier/prettier": {
// Settings for how to process Vue SFC Blocks
SFCBlocks: {
template: false,
script: false,
style: false,
},
// Use prettierrc for prettier options or not (default: `true`)
usePrettierrc: true,
// Set the options for `prettier.getFileInfo`.
// @see https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath-options
fileInfoOptions: {
// Path to ignore file (default: `'.prettierignore'`)
// Notice that the ignore file is only used for this plugin
ignorePath: ".testignore",
// Process the files in `node_modules` or not (default: `false`)
withNodeModules: false,
},
},
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
// 'comma-dangle': ['error', 'always-multiline'],
"indent": ["error", 2, { SwitchCase: 1 }],
"linebreak-style": ["error", "unix"],
"quotes": [
"off",
"double",
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
"semi": ["error", "always"],
"no-unused-vars": ["warn"],
"no-console": 0,
"no-case-declarations": 0,
"no-prototype-builtins": 0,
"vue/no-v-text-v-html-on-component": 0,
"vue/no-v-model-argument": 0,
"vue/valid-model-definition": 0,
"vue/valid-attribute-name": 0,
"vue/singleline-html-element-content-newline": [
"off",
{
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
ignores: [
"pre",
"textarea",
"span",
"translate",
"a",
"v-icon",
"v-text-field",
"v-input",
"v-select",
"v-switch",
"v-checkbox",
"v-img",
],
externalIgnores: [],
},
],
"vue/first-attribute-linebreak": [
"error",
{
singleline: "ignore",
multiline: "ignore",
},
],
"prettier/prettier": [
"warn",
{
printWidth: 120,
semi: true,
singleQuote: false,
bracketSpacing: true,
trailingComma: "es5",
htmlWhitespaceSensitivity: "css",
quoteProps: "consistent",
proseWrap: "never",
},
],
},
};

View File

@@ -16,7 +16,7 @@ install-npm:
install-testcafe:
npm install -g testcafe@latest
install-eslint:
npm install -g eslint@8 eslint-config-prettier eslint-config-standard eslint-formatter-pretty eslint-plugin-html eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-vue eslint-webpack-plugin vue-eslint-parser prettier
npm install -g eslint globals @eslint/eslintrc @eslint/js eslint-config-prettier eslint-formatter-pretty eslint-plugin-html eslint-plugin-import eslint-plugin-node eslint-plugin-prettier eslint-plugin-promise eslint-plugin-vue eslint-webpack-plugin vue-eslint-parser prettier
install:
npm install --no-update-notifier --no-audit
update:

View File

@@ -14,8 +14,8 @@ axios MIT Matt Zabriskie
axios-mock-adapter MIT Colin Timmermans <colintimmermans@gmail.com>
babel-loader MIT Luis Couto <hello@luiscouto.pt>
babel-plugin-istanbul BSD-3-Clause Thai Pangsakulyanont @dtinth
babel-plugin-polyfill-corejs3 MIT n/a
browserslist MIT Andrey Sitnik <andrey@sitnik.ru>
chai MIT Jake Luer <jake@alogicalparadox.com>
cheerio MIT Matt Mueller <mattmuelle@gmail.com>
chrome-finder ISC gwuhaolin
core-js MIT Denis Pushkarev zloirock@zloirock.ru http://zloirock.ru
@@ -23,36 +23,17 @@ cross-env MIT Kent C. Dodds <me@kentcdodds.com
css-loader MIT Tobias Koppers @sokra
cssnano MIT Ben Briggs beneb.info@gmail.com http://beneb.info
easygettext MIT Polyconseil
eslint MIT Nicholas C. Zakas <nicholas+npm@nczconsulting.com>
eslint-config-prettier MIT Simon Lydell
eslint-formatter-pretty MIT Sindre Sorhus sindresorhus@gmail.com https://sindresorhus.com
eslint-plugin-html ISC n/a
eslint-plugin-import MIT Ben Mosher <me@benmosher.com>
eslint-plugin-node MIT Toru Nagashima
eslint-plugin-prettier MIT Teddy Katz
eslint-plugin-promise ISC jden <jason@denizac.org>
eslint-plugin-vue MIT Toru Nagashima (https://github.com/mysticatea)
eslint-plugin-vuetify MIT Kael Watts-Deuchar <kaelwd@gmail.com>
eslint-webpack-plugin MIT Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>
eventsource-polyfill MIT amvtek <devel@amvtek.com>
file-loader MIT Tobias Koppers @sokra
file-saver MIT Eli Grey <me@eligrey.com>
floating-vue MIT Guillaume Chau <guillaume.b.chau@gmail.com>
hls.js Apache-2.0 n/a
i MIT Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (pksunkara.github.com)
karma MIT Vojta Jína <vojta.jina@gmail.com>
karma-chrome-launcher MIT Vojta Jina <vojta.jina@gmail.com>
karma-coverage-istanbul-reporter MIT Matt Lewis
karma-htmlfile-reporter MIT Matthias Schuetz MatthiasSchuetz@gmx.de
karma-mocha MIT Vojta Jina <vojta.jina@gmail.com>
karma-verbose-reporter MIT Pier Fumagalli pier@usrz.com
karma-webpack MIT Tobias Koppers @sokra
luxon MIT Isaac Cambron
maplibre-gl BSD-3-Clause n/a
memoize-one MIT Alex Reardon <alexreardon@gmail.com>
mini-css-extract-plugin MIT Tobias Koppers @sokra
minimist MIT James Halliday mail@substack.net http://substack.net
mocha MIT TJ Holowaychuk <tj@vision-media.ca>
node-storage-shim ISC Michael Nahkies
passive-events-support MIT Ignas Damunskis <ignas3run@gmail.com>
photoswipe MIT Dmytro Semenov (https://dimsemenov.com)

138
frontend/eslint.config.mjs Normal file
View File

@@ -0,0 +1,138 @@
import { defineConfig, globalIgnores } from "eslint/config";
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 defineConfig([
globalIgnores([
"**/coverage/",
"**/node_modules/",
"tests/screenshots/",
"tests/acceptance/screenshots/",
"tests/upload-files/",
"**/*.html",
"**/.idea",
"**/.github",
"**/.tmp",
"**/.local",
"**/.cache",
"**/.var",
]),
{
extends: compat.extends(
"eslint:recommended",
"plugin:vue/recommended",
"plugin:prettier/recommended",
"plugin:vue/base",
"plugin:vuetify/base"
),
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.node,
...globals.mocha,
},
ecmaVersion: "latest",
sourceType: "module",
},
settings: {
"prettier/prettier": {
// Settings for how to process Vue SFC Blocks
SFCBlocks: {
template: false,
script: false,
style: false,
},
// Use prettierrc for prettier options or not (default: `true`)
usePrettierrc: true,
// Set the options for `prettier.getFileInfo`.
// @see https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath-options
fileInfoOptions: {
// Path to ignore file (default: `'.prettierignore'`)
// Notice that the ignore file is only used for this plugin
ignorePath: ".testignore",
// Process the files in `node_modules` or not (default: `false`)
withNodeModules: false,
},
},
},
rules: {
"indent": ["error", 2, { SwitchCase: 1 }],
"linebreak-style": ["error", "unix"],
"quotes": [
"off",
"double",
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
"semi": ["error", "always"],
"no-unused-vars": ["warn"],
"no-console": 0,
"no-case-declarations": 0,
"no-prototype-builtins": 0,
"vue/no-v-text-v-html-on-component": 0,
"vue/no-v-model-argument": 0,
"vue/valid-model-definition": 0,
"vue/valid-attribute-name": 0,
"vue/singleline-html-element-content-newline": [
"off",
{
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
ignores: [
"pre",
"textarea",
"span",
"translate",
"a",
"v-icon",
"v-text-field",
"v-input",
"v-select",
"v-switch",
"v-checkbox",
"v-img",
],
externalIgnores: [],
},
],
"vue/first-attribute-linebreak": [
"error",
{
singleline: "ignore",
multiline: "ignore",
},
],
"prettier/prettier": [
"warn",
{
printWidth: 120,
semi: true,
singleQuote: false,
bracketSpacing: true,
trailingComma: "es5",
htmlWhitespaceSensitivity: "css",
quoteProps: "consistent",
proseWrap: "never",
},
],
},
},
]);

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
"trace": "webpack --stats-children",
"debug": "webpack --stats-error-details",
"lint": "eslint --cache src/ *.js",
"fmt": "eslint --cache --fix src/ *.js .eslintrc.js",
"fmt": "eslint --cache --fix src/ *.js eslint.config.mjs",
"test": "karma start",
"upgrade": "npm update && npm audit fix",
"testcafe": "testcafe",
@@ -39,7 +39,6 @@
"babel-plugin-istanbul": "^7.0.0",
"babel-plugin-polyfill-corejs3": "^0.12.0",
"browserslist": "^4.24.4",
"chai": "^5.2.0",
"cheerio": "1.0.0-rc.12",
"chrome-finder": "^1.0.7",
"core-js": "^3.41.0",
@@ -47,36 +46,17 @@
"css-loader": "^7.1.2",
"cssnano": "^7.0.6",
"easygettext": "^2.17.0",
"eslint": ">=8.57.0",
"eslint-config-prettier": "^10.1.1",
"eslint-formatter-pretty": "^6.0.1",
"eslint-plugin-html": "^8.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-vue": "^9.32.0",
"eslint-plugin-vuetify": "^2.5.2",
"eslint-webpack-plugin": "^4.2.0",
"eventsource-polyfill": "^0.9.6",
"file-loader": "^6.2.0",
"file-saver": "^2.0.5",
"floating-vue": "^5.2.2",
"hls.js": "^1.5.20",
"i": "^0.3.7",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-htmlfile-reporter": "^0.3.8",
"karma-mocha": "^2.0.1",
"karma-verbose-reporter": "^0.0.8",
"karma-webpack": "^5.0.1",
"luxon": "^3.6.0",
"maplibre-gl": "^5.3.0",
"memoize-one": "^6.0.0",
"mini-css-extract-plugin": "^2.9.2",
"minimist": ">=1.2.8",
"mocha": "^11.1.0",
"node-storage-shim": "^2.0.1",
"passive-events-support": "^1.1.0",
"photoswipe": "^5.4.4",
@@ -95,7 +75,6 @@
"sass-loader": "^16.0.5",
"server": "^1.0.41",
"sockette": "^2.0.6",
"standard": "^17.1.2",
"style-loader": "^4.0.0",
"svg-url-loader": "^8.0.0",
"tar": "^7.4.3",
@@ -129,6 +108,29 @@
">0.25% and last 2 years"
],
"devDependencies": {
"@vue/language-server": "^2.2.8"
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.23.0",
"@vue/language-server": "^2.2.8",
"chai": "^5.2.0",
"eslint": "^9.23.0",
"eslint-config-prettier": "^10.1.1",
"eslint-formatter-pretty": "^6.0.1",
"eslint-plugin-html": "^8.1.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-vue": "^10.0.0",
"eslint-plugin-vuetify": "^2.5.2",
"eslint-webpack-plugin": "^5.0.0",
"globals": "^16.0.0",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-htmlfile-reporter": "^0.3.8",
"karma-mocha": "^2.0.1",
"karma-verbose-reporter": "^0.0.8",
"karma-webpack": "^5.0.1",
"mocha": "^11.1.0"
}
}

View File

@@ -48,7 +48,7 @@ sudo npm install --unsafe-perm=true --allow-root -g \
npm@latest npm-check-updates@latest license-report@latest n@latest testcafe@3.7.2
echo "Installing ESLint..."
sudo npm install --unsafe-perm=true --allow-root -g \
eslint@8 eslint-config-prettier eslint-config-standard eslint-formatter-pretty \
eslint globals @eslint/eslintrc @eslint/js eslint-config-prettier eslint-formatter-pretty \
eslint-plugin-html eslint-plugin-import eslint-plugin-node eslint-plugin-prettier \
eslint-plugin-promise eslint-plugin-vue eslint-webpack-plugin prettier
echo "Installing Vue Language Tools..."