-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
35 lines (35 loc) · 1.22 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
module.exports = {
root: true,
env: {
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:jest/recommended",
],
parserOptions: {
parser: "@typescript-eslint/parser",
},
rules: {
// Prettier code style checks should not block dev builds:
"prettier/prettier": ["warn"],
// Enforce and auto-fix double-quotes wherever possible, and don't allow
// backtick strings unless interpolation is actually being used within them:
quotes: ["warn", "double", { avoidEscape: true }],
"no-console": ["warn", { allow: ["error", "warn", "info"] }],
"no-debugger": "warn",
"prefer-const": ["warn", { destructuring: "all" }],
// Turn off in favor of TS version below, which is aware of `import type {...`
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ ignoreRestSiblings: true },
// `ignoreRestSiblings` allows easily "ommitting" key/value data from an object:
// (see https://eslint.org/docs/rules/no-unused-vars#ignorerestsiblings)
],
// Some tests call functions which assert for them, which should be valid:
"jest/expect-expect": "off",
},
};