Skip to content

Commit

Permalink
fix: 适配 eslint v9 更新, 兼容低版本 node (#1930)
Browse files Browse the repository at this point in the history
* fix: eslint v9 版本配置文件更新
  • Loading branch information
Raindrop-YL authored Nov 9, 2024
1 parent d8e36ab commit fae6f41
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
4 changes: 0 additions & 4 deletions web/.eslintignore

This file was deleted.

17 changes: 0 additions & 17 deletions web/.eslintrc.js

This file was deleted.

25 changes: 25 additions & 0 deletions web/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import globals from "globals"

export default [
js.configs.recommended,
...pluginVue.configs['flat/essential'],
{
name: 'app/files-to-lint',
files: ['**/*.{js,mjs,jsx,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: "module",
globals: globals.node
},
rules: {
"vue/max-attributes-per-line" : 0,
"vue/no-v-model-argument" : 0
},
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/build/*.js', '**/src/assets/**', '**/public/**'],
},
]
7 changes: 4 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.1",
"@eslint/js": "^9.14.0",
"@vitejs/plugin-legacy": "^5.4.2",
"@vitejs/plugin-vue": "^5.1.3",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-router": "~5.0.8",
Expand All @@ -60,8 +61,8 @@
"babel-plugin-import": "^1.13.8",
"chalk": "^5.3.0",
"dotenv": "^16.4.5",
"eslint": "^9.9.1",
"eslint-plugin-vue": "^9.28.0",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.30.0",
"sass": "^1.78.0",
"terser": "^5.31.6",
"vite": "^5.4.3",
Expand Down

0 comments on commit fae6f41

Please sign in to comment.