-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
eslint.config.js
31 lines (30 loc) · 904 Bytes
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import eslintPluginPrettier from "eslint-plugin-prettier";
import prettierConfig from "eslint-config-prettier";
export default [
{
name: "prettier", // Configuration name
files: ["**/*.{js,jsx,ts,tsx,json,md,yml,yaml,html,css}"],
plugins: {
prettier: eslintPluginPrettier, // Include Prettier plugin
},
rules: {
...prettierConfig.rules, // Disable ESLint rules that conflict with Prettier
},
},
{
name: "typescript", // Configuration name
files: ["**/*.ts"], // TypeScript-specific configuration
plugins: {
"@typescript-eslint": typescriptEslint, // Include TypeScript ESLint plugin
},
languageOptions: {
parser: tsParser,
},
rules: {
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
},
},
];