forked from bitauth/libauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
68 lines (68 loc) · 2.5 KB
/
.eslintrc
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json" },
"env": { "es6": true },
"ignorePatterns": ["node_modules", "build", "coverage", "scratch"],
"extends": ["bitauth"],
"globals": { "BigInt": true, "console": true, "WebAssembly": true },
"rules": {
"@typescript-eslint/sort-type-union-intersection-members": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off", // TODO: enable when Uint8Array can be made readonly, see `Immutable` type
"@typescript-eslint/no-unused-expressions": "off", // TODO: bug causes crash in eslint 7.2.0 – re-enable later
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"import/no-restricted-path": "off",
"@typescript-eslint/prefer-literal-enum-member": "warn",
"functional/prefer-tacit": "warn",
"functional/no-mixed-type": "warn",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"functional/no-return-void": "off",
"eslint-comments/no-unused-disable": "warn",
"@typescript-eslint/consistent-type-exports": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"no-debugger": "warn",
"@typescript-eslint/naming-convention": "off"
// "@typescript-eslint/naming-convention": [
// "error",
// {
// "selector": "default",
// "format": ["camelCase"],
// "leadingUnderscore": "allow"
// },
// {
// "selector": "variable",
// "format": ["camelCase", "UPPER_CASE"],
// "leadingUnderscore": "allow"
// },
// { "selector": "typeLike", "format": ["PascalCase"] },
// { "selector": "enumMember", "format": ["camelCase", "UPPER_CASE"] } // Allow UPPER_CASE for opcodes
// ]
},
"overrides": [
/*
* Require all test files to import functionality from the entry point
* (to test that exports are available to consumers as expected).
*/
{
"files": ["**.spec.ts", "**.bench.ts"],
"rules": {
"import/no-restricted-paths": [
"warn",
{
"zones": [
{
"target": "./src",
"from": "./src/lib",
"except": ["lib.ts", "(.*).helper.ts", "(.*).json"]
}
]
}
]
}
}
]
}