28 lines
784 B
JavaScript
28 lines
784 B
JavaScript
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
import prettierConfig from "eslint-config-prettier";
|
|
|
|
/** @type {import("eslint").Linter.FlatConfig[]} */
|
|
export default [
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
plugins: {
|
|
"@typescript-eslint": tsPlugin,
|
|
},
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: true,
|
|
},
|
|
},
|
|
rules: {
|
|
...tsPlugin.configs["recommended"].rules,
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
},
|
|
},
|
|
prettierConfig,
|
|
];
|