Skip to content

Commit

Permalink
Partially upgrade to eslint 9
Browse files Browse the repository at this point in the history
- with disable rules at one place
- and ignore cypress override for now
  • Loading branch information
freizl committed Sep 2, 2024
1 parent 75e2d3a commit 51dda91
Show file tree
Hide file tree
Showing 8 changed files with 565 additions and 420 deletions.
File renamed without changes.
55 changes: 55 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";

///////////////////////////////////////////////////////////////////////////////
// How to migrate this to new eslint config? //
///////////////////////////////////////////////////////////////////////////////

// {
// files: [
// "**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}",
// "cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}",
// ],
// extends: ["plugin:cypress/recommended"],
// },
//
// FIXME: fix this error
// /Users/haishengwu/freizl/duyijing/src/App.vue
// 2:10 error 'RouterLink' is defined but never used @typescript-eslint/no-unused-vars
// 2:22 error 'RouterView' is defined but never used @typescript-eslint/no-unused-vars

export default [
{
ignores: [
".gitignore",
"dist/*",
".vscode/*",
"eslint.config.js",
".log/*",
"public/*",
],
},
{
files: ["**/*.{js,ts,vue}"],
},
{
languageOptions: {
globals: globals.browser,
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/essential"],
// ...pluginVue.configs["flat/strongly-recommended"],
// ...pluginVue.configs["flat/recommended"],
{
files: ["**/*.vue"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
];
Loading

0 comments on commit 51dda91

Please sign in to comment.