-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (49 loc) · 1.5 KB
/
eslint.config.js
File metadata and controls
55 lines (49 loc) · 1.5 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import js from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
{
ignores: ["dist/**", "node_modules/**", "open-creator-rails/**"],
},
js.configs.recommended,
{
files: ["**/*.ts"],
languageOptions: {
parser: tsParser,
sourceType: "module",
ecmaVersion: "latest",
globals: {
// Node 18+ global fetch (our SDK uses `fetch` in Node/ESM).
fetch: "readonly",
// Node globals used by integration tests.
process: "readonly",
setTimeout: "readonly",
setInterval: "readonly",
clearTimeout: "readonly",
clearInterval: "readonly",
// Vitest globals used in tests.
describe: "readonly",
it: "readonly",
expect: "readonly",
vi: "readonly",
beforeEach: "readonly",
beforeAll: "readonly",
afterAll: "readonly",
test: "readonly",
},
},
plugins: {
"@typescript-eslint": tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
// This repo uses `as any` in mocks/test doubles.
"@typescript-eslint/no-explicit-any": "off",
// Type assertions are used for hex/address branded types.
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
},
},
];