-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
53 lines (53 loc) · 1.76 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.lint.json",
include: ["./src/**/*.ts", "./test/**/*.ts", ".eslintrc.js", "./e2e/**/*.ts"],
},
plugins: ["node", "prettier", "@typescript-eslint", "mocha", "chai-expect"],
rules: {
"prettier/prettier": ["warn"],
indent: 0, // avoid conflict with prettier's indent system
"linebreak-style": ["error", "unix"],
quotes: ["error", "double", { avoidEscape: true }],
semi: ["error", "always"],
"spaced-comment": ["error", "always", { exceptions: ["-", "+"] }],
"no-console": 0,
"no-restricted-imports": [
"error",
{
"patterns": [
{ group: ["@ethersproject/bignumber"], message: "Use 'src/utils/BigNumberUtils' instead" },
{ group: ["@ethersproject/contracts"], importNames: ["Event"], message: "Use Log from 'src/interfaces/Common' instead" },
],
"paths": [
{ name: "ethers", importNames: ["BigNumber"], message: "Use 'src/utils/BigNumberUtils' instead" },
{ name: "ethers", importNames: ["Event"], message: "Use Log from 'src/interfaces/Common' instead" }
]
}
],
"@typescript-eslint/no-unused-vars": [
"error", {
argsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"chai-expect/missing-assertion": 2,
"no-duplicate-imports": "error",
"require-await": "error",
"@typescript-eslint/no-floating-promises": ["error"],
},
};