mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 10:36:55 +00:00
Upgrade frontend dependencies and switch ESLint to a flat config
- Runtime majors: vue-router 5, reveal.js 6, fontawesome 7. Checked against the code that uses them: no change needed for reveal.js (the default export is still a callable factory and every method/option used is still present) or fontawesome (all seven registered icons still resolve). - frontend/src/router/index.js: guards return the redirect instead of calling the deprecated next() callback, which works on vue-router 4 and 5. - Add frontend/eslint.config.mjs because eslint 10 requires a flat config; the lint script now runs eslint directly instead of vue-cli-service. - Drop tooling nothing in the webpack configs uses (@vue/cli-*, jshint, html-webpack-plugin, webpack-bundle-analyzer, @babel/core) and delete the dead vue.config.js. npm audit 35 -> 5 (all dev-only), --omit=dev is 0. - frontend/src/views/UserView.vue: the $route watcher no longer declares unused params.
This commit is contained in:
1 parent
6bcdf89fdc
commit
4d0ba750ad
6 files changed
+2777
-8461
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import js from '@eslint/js'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
|
||||
export default [
|
||||
{ ignores: ['dist/**', 'node_modules/**', 'public/**'] },
|
||||
js.configs.recommended,
|
||||
...pluginVue.configs['flat/essential'],
|
||||
|
||||
// Build scripts (webpack.*.js) run in Node, so they use CommonJS globals.
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'commonjs',
|
||||
globals: {
|
||||
require: 'readonly',
|
||||
module: 'readonly',
|
||||
__dirname: 'readonly',
|
||||
process: 'readonly',
|
||||
console: 'readonly',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Application code is browser code bundled by webpack.
|
||||
{
|
||||
files: ['src/**'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
window: 'readonly',
|
||||
document: 'readonly',
|
||||
localStorage: 'readonly',
|
||||
console: 'readonly',
|
||||
setTimeout: 'readonly',
|
||||
clearTimeout: 'readonly',
|
||||
process: 'readonly',
|
||||
},
|
||||
},
|
||||
rules: {},
|
||||
},
|
||||
]
|
||||
Reference in new issue
Block a user