forked from across-protocol/relayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
55 lines (55 loc) · 1.71 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
54
55
module.exports = {
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
plugins: ["node", "prettier", "@typescript-eslint", "mocha", "chai-expect"],
extends: [
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:node/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
project: "./tsconfig.eslint.json",
},
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"],
curly: ["error", "all"],
"spaced-comment": ["error", "always", { exceptions: ["-", "+"] }],
"no-console": 2,
camelcase: "off",
"@typescript-eslint/camelcase": "off",
"mocha/no-exclusive-tests": "error",
"@typescript-eslint/no-var-requires": "off",
"node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }],
// Disable warnings for { a, b, ...rest } variables, since this is typically used to remove variables.
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }],
"chai-expect/missing-assertion": 2,
"no-duplicate-imports": "error",
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
},
settings: {
node: {
tryExtensions: [".js", ".ts"],
},
},
overrides: [
{
files: ["scripts/*.ts", "tasks/*.ts", "src/scripts/*.ts"],
rules: {
"no-console": 0,
},
},
],
};