migrate eslint to flat config (eslint 10)

This commit is contained in:
2026-05-04 20:01:40 -03:00
committed by hueso
parent 63f5ee017b
commit c481d9d0a5
2 changed files with 34 additions and 18 deletions

View File

@@ -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",
},
};

34
eslint.config.js Normal file
View File

@@ -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",
},
},
];