eslint.config.js•1.23 kB
import js from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsparser from "@typescript-eslint/parser";
import prettier from "eslint-config-prettier";
export default [
{
files: ["src/**/*.ts"],
languageOptions: {
parser: tsparser,
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: 2020,
},
globals: {
console: "readonly",
process: "readonly",
Buffer: "readonly",
require: "readonly",
module: "readonly",
__dirname: "readonly",
__filename: "readonly",
},
},
plugins: {
"@typescript-eslint": tseslint,
},
rules: {
...js.configs.recommended.rules,
...tseslint.configs.recommended.rules,
...prettier.rules,
"no-unused-vars": "off",
"no-redeclare": "off",
"no-undef": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
},
},
];