This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
62 lines (62 loc) · 1.59 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
56
57
58
59
60
61
62
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
plugins: [
"import",
"@typescript-eslint",
"eslint-comments",
"jest",
"promise",
],
extends: [
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:eslint-comments/recommended",
"plugin:jest/recommended",
"plugin:promise/recommended",
"prettier",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
env: {
node: true,
browser: true,
jest: true,
},
rules: {
// note you must disable the base rule as it can report incorrect errors
quotes: ["error", "double"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-underscore-dangle": "off",
"lines-between-class-members": ["warn", "always"],
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/naming-convention": [
"error",
{ selector: "typeLike", format: ["PascalCase"] },
{ selector: "enumMember", format: ["PascalCase"] },
{ selector: "variableLike", format: ["camelCase"] },
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: false,
},
},
{
selector: "typeAlias",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: false,
},
},
],
"class-methods-use-this": "off",
"jest/no-conditional-expect": "off",
},
};