From c481d9d0a5b13d2e2be4fd96a9ad33c28188aed7 Mon Sep 17 00:00:00 2001 From: Arthur Abeilice Date: Mon, 4 May 2026 20:01:40 -0300 Subject: [PATCH] migrate eslint to flat config (eslint 10) --- .eslintrc.cjs | 18 ------------------ eslint.config.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 18 deletions(-) delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 0b2a030..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-env node */ -require("@rushstack/eslint-patch/modern-module-resolution"); - -module.exports = { - root: true, - env: { - node: true, - }, - extends: [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/eslint-config-typescript", - "@vue/eslint-config-prettier", - ], - parserOptions: { - ecmaVersion: "latest", - }, -}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..1dcc1ba --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,34 @@ +import pluginVue from "eslint-plugin-vue"; +import vueTsConfig from "@vue/eslint-config-typescript"; +import vuePrettierConfig from "@vue/eslint-config-prettier"; + +export default [ + { + ignores: [ + "node_modules/**", + "dist/**", + "coverage/**", + "public/**", + "p2pix-smart-contracts/**", + "vendor/**", + "src/generated.ts", + ], + }, + ...pluginVue.configs["flat/essential"], + ...vueTsConfig(), + vuePrettierConfig, + { + rules: { + "@typescript-eslint/no-unused-vars": [ + "warn", + { + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + }, + ], + "@typescript-eslint/no-explicit-any": "warn", + }, + }, +];