代码拉取完成,页面将自动刷新
import js from "@eslint/js";
import ts from "@typescript-eslint/eslint-plugin";
import parser from "@typescript-eslint/parser";
import prettier from "eslint-plugin-prettier/recommended";
import globals from "globals";
export default [
{
files: ["*.js", "*.mjs"],
rules: {
...js.configs.recommended.rules,
eqeqeq: ["error", "smart"],
"no-unused-vars": "warn",
},
languageOptions: {
globals: {
...globals.builtin,
...globals.node,
},
},
},
{
files: ["src/**/*.ts", "src/**/*.mts"],
ignores: ["src/clients/**"],
plugins: { "@typescript-eslint": ts },
rules: {
...js.configs.recommended.rules,
...ts.configs.recommended.rules,
eqeqeq: ["error", "smart"],
// TypeScript covers undefined things instead
"no-undef": "off",
"no-unused-vars": "off",
"no-redeclare": "off",
"@typescript-eslint/no-unused-vars": "warn",
// Some untyped things may require extra effort to be fixed
"@typescript-eslint/no-explicit-any": "off",
// replacement of ESLint's no-redeclare with support for function overload
"@typescript-eslint/no-redeclare": "error",
},
languageOptions: {
parser,
globals: {
...globals.builtin,
...globals.browser,
...globals.node,
},
},
},
{
files: ["src/**/*.test.ts"],
languageOptions: { globals: { ...globals.mocha } },
},
prettier,
];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。