forked from christoph-fricke/openapi-msw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
30 lines (28 loc) · 990 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
29
30
import eslint from "@eslint/js";
import tsEslint from "typescript-eslint";
// Fix for constructor-super rule, structuredClone was added in Node 17
// eslint-disable-next-line no-undef
global.structuredClone = (val) => JSON.parse(JSON.stringify(val));
export default tsEslint.config(
{
ignores: ["coverage", "cjs", "dist", "test/fixtures/*.ts"],
},
eslint.configs.recommended,
...tsEslint.configs.recommended,
...tsEslint.configs.stylistic,
{
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",
},
],
"@typescript-eslint/consistent-type-definitions": "off",
},
},
);