Upgrade ESLint from 8 to 9 with flat config migration
Replace .eslintrc.cjs with eslint.config.mjs, upgrade eslint-plugin-vue to 10, eslint-plugin-cypress to 6, @vue/eslint-config-prettier to 10, and remove @rushstack/eslint-patch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
/* eslint-env node */
|
||||
require("@rushstack/eslint-patch/modern-module-resolution");
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended",
|
||||
"@vue/eslint-config-prettier",
|
||||
],
|
||||
overrides: [
|
||||
{
|
||||
files: ["cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}"],
|
||||
extends: ["plugin:cypress/recommended"],
|
||||
},
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
},
|
||||
};
|
||||
17
eslint.config.mjs
Normal file
17
eslint.config.mjs
Normal file
@@ -0,0 +1,17 @@
|
||||
import js from "@eslint/js";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
import pluginCypress from "eslint-plugin-cypress";
|
||||
import skipFormatting from "@vue/eslint-config-prettier";
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs,ts,vue}"],
|
||||
...js.configs.recommended,
|
||||
},
|
||||
...pluginVue.configs["flat/essential"],
|
||||
skipFormatting,
|
||||
{
|
||||
files: ["cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}"],
|
||||
...pluginCypress.configs.recommended,
|
||||
},
|
||||
];
|
||||
1431
package-lock.json
generated
1431
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -48,20 +48,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@4tw/cypress-drag-drop": "^2.3.1",
|
||||
"@rushstack/eslint-patch": "^1.16.1",
|
||||
"@types/cytoscape": "^3.21.9",
|
||||
"@types/cytoscape-dagre": "^2.3.4",
|
||||
"@types/cytoscape-popper": "^2.0.4",
|
||||
"@types/node": "^20.19.37",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"cypress": "^15.11.0",
|
||||
"cypress-xpath": "^2.0.1",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint-plugin-cypress": "^2.15.2",
|
||||
"eslint-plugin-vue": "^9.33.0",
|
||||
"eslint": "^9.39.3",
|
||||
"eslint-plugin-cypress": "^6.1.0",
|
||||
"eslint-plugin-vue": "^10.8.0",
|
||||
"jsdom": "^28.1.0",
|
||||
"postcss": "^8.5.8",
|
||||
"prettier": "^3.8.1",
|
||||
@@ -71,6 +70,7 @@
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^6.4.1",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^3.2.4",
|
||||
"vue-eslint-parser": "^10.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ app.config.globalProperties.$cytoscape = cytoscape;
|
||||
|
||||
// Cytoscape.js's style
|
||||
cytoscape.use( dagre );
|
||||
cytoscape.use( popper((ref: any) => ref) );
|
||||
cytoscape.use( popper((ref) => ref) );
|
||||
|
||||
app.use(pinia);
|
||||
app.use(router);
|
||||
|
||||
Reference in New Issue
Block a user