-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.mjs
28 lines (27 loc) · 916 Bytes
/
eslint.config.mjs
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
import eslint from "@eslint/js";
import tsEslint from "typescript-eslint";
export default tsEslint.config(
{
ignores: ["coverage", "cjs", "dist", "test/fixtures/*.ts"],
},
eslint.configs.recommended,
...tsEslint.configs.recommended,
...tsEslint.configs.stylistic,
{
files: ["test/**/*.test-d.ts"],
// Type tests commonly create a variable which is only used for type checks.
rules: { "@typescript-eslint/no-unused-vars": "off" },
},
{
rules: {
"@typescript-eslint/no-empty-object-type": [
"error",
// Often types are computed and expanded in editor previews,
// which can lead to verbose and hard-to-understand type signatures.
// Interfaces keep their name in previews, which can be used to clarify
// previews by using interfaces that only extend a type.
{ allowInterfaces: "with-single-extends" },
],
},
},
);