Upgrade frontend dependencies and migrate to ESLint 10
Update npm packages to their latest releases, including eslint 10, @vue/eslint-config-prettier 10 and jsdom 30. Replace .eslintrc.cjs with a flat eslint.config.js and drop @rushstack/eslint-patch. Drop unused catch bindings flagged by ESLint 10's no-unused-vars defaults. Override glob and minimatch to patched releases, since js-beautify and eslint still pull in vulnerable versions.
This commit is contained in:
1 parent
c7b1dd4658
commit
e5068cc833
5 files changed
+741
-1290
No files matched your search
@@ -1,18 +0,0 @@
|
||||
/* eslint-env node */
|
||||
require('@rushstack/eslint-patch/modern-module-resolution')
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2022: true
|
||||
},
|
||||
'extends': [
|
||||
'plugin:vue/essential',
|
||||
'eslint:recommended',
|
||||
'@vue/eslint-config-prettier/skip-formatting'
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import js from '@eslint/js'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
||||
import globals from 'globals'
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', 'dist-ssr/**', 'coverage/**']
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,vue}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: globals.browser
|
||||
}
|
||||
},
|
||||
js.configs.recommended,
|
||||
...pluginVue.configs['flat/essential'],
|
||||
skipFormatting
|
||||
]
|
||||
Generated
+709
-1265
File diff suppressed because it is too large.
Load diff
+10
-5
@@ -8,7 +8,7 @@
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write src/"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -18,16 +18,21 @@
|
||||
"vue-router": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rushstack/eslint-patch": "^1.16.1",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@vitejs/plugin-vue": "^6.0.7",
|
||||
"@vue/eslint-config-prettier": "^8.0.0",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/test-utils": "^2.4.11",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint": "^10.14.0",
|
||||
"eslint-plugin-vue": "^10.11.1",
|
||||
"jsdom": "^29.1.1",
|
||||
"globals": "^17.14.0",
|
||||
"jsdom": "^30.1.3",
|
||||
"prettier": "^3.8.3",
|
||||
"vite": "^8.0.16",
|
||||
"vitest": "^5.0.2",
|
||||
"vue-eslint-parser": "^10.4.1"
|
||||
},
|
||||
"overrides": {
|
||||
"glob": "^14.0.3",
|
||||
"minimatch": "^11.0.4"
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ async function loadFeeds() {
|
||||
try {
|
||||
const response = await axios.get(`/api/v1/article/feeds/${userId}`, authHeaders())
|
||||
feeds.value = response.data.feeds
|
||||
} catch (e) {
|
||||
} catch {
|
||||
error.value = 'Failed to load feeds.'
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ async function deleteFeed(feedId) {
|
||||
try {
|
||||
await axios.delete(`/api/v1/article/feed/${feedId}`, authHeaders())
|
||||
feeds.value = feeds.value.filter(f => f.id !== feedId)
|
||||
} catch (e) {
|
||||
} catch {
|
||||
error.value = 'Failed to delete feed.'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user