forked from bitauth/libauth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc
More file actions
51 lines (51 loc) · 1.58 KB
/
.eslintrc
File metadata and controls
51 lines (51 loc) · 1.58 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json" },
"env": { "es6": true },
"ignorePatterns": ["node_modules", "build", "coverage"],
"extends": ["bitauth"],
"globals": { "BigInt": true, "console": true, "WebAssembly": true },
"rules": {
"@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/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": [
"error",
{
"zones": [
{
"target": "./src",
"from": "./src/lib",
"except": ["lib.ts", "(.*).helper.ts", "(.*).json"]
}
]
}
]
}
}
]
}