diff --git a/eslint.config.mjs b/eslint.config.mjs index 6de0fdf936..6aabe7e208 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,8 +1,11 @@ import prettier from "eslint-plugin-prettier"; +import eslintConfigPrettier from "eslint-config-prettier"; import globals from "globals"; import path from "node:path"; import { fileURLToPath } from "node:url"; import js from "@eslint/js"; +import pluginVue from "eslint-plugin-vue"; +import ts from "typescript-eslint"; import { FlatCompat } from "@eslint/eslintrc"; const __filename = fileURLToPath(import.meta.url); @@ -10,25 +13,26 @@ const __dirname = path.dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended, - allConfig: js.configs.all + allConfig: js.configs.all, }); -export default [...compat.extends("eslint:recommended", "eslint-config-prettier"), { - plugins: { - prettier, - }, - - languageOptions: { - globals: { - ...globals.browser, - ...globals.jquery, +export default [ + ...compat.extends("eslint:recommended", "eslint-config-prettier"), + ...ts.configs.recommended, + ...pluginVue.configs["flat/recommended"], + eslintConfigPrettier, + { + plugins: { + prettier, + }, + languageOptions: { + globals: { + ...globals.browser, + ...globals.jquery, + }, + }, + rules: { + "prettier/prettier": ["error"], }, }, - - rules: { - indent: ["error", 4], - "linebreak-style": ["error", "unix"], - semi: ["error", "always"], - "prettier/prettier": ["error"], - }, -}]; \ No newline at end of file +]; diff --git a/package.json b/package.json index dc13a1f3d1..841f13b0a2 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "eslint": "^9.12.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-vue": "^9.29.0", "gulp-tap": "^1.0.1", "html-webpack-plugin": "^5.5.0", "node-sass-tilde-importer": "^1.0.2", @@ -89,6 +90,7 @@ "swagger-cli": "^4.0.4", "ts-loader": "^9.2.7", "typescript": "^4.6.2", + "typescript-eslint": "^8.9.0", "vinyl-source-stream": "^2.0.0", "vue-loader": "^17.0.0", "watchify": "^4.0.0",