-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc
77 lines (77 loc) · 2.63 KB
/
.eslintrc
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"extends": [
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"rules": {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/interface-name-prefix": 0, // avoiding I prefix seems weird, forcing it seems weird too.
"no-console": 0, // we use console
"@typescript-eslint/no-explicit-any": 0, // we use `any` sometimes
"@typescript-eslint/camelcase": 0, // elasticsearch keys are lower_case
"@typescript-eslint/no-empty-function": 0,
"no-unused-vars": 0, // using the typescript one
"@typescript-eslint/no-unused-vars": [
2,
{
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
// "@typescript-eslint/await-thenable": 2,
"no-return-await": 2,
//"import/no-cycle": [2,{"ignoreExternal": true}], // to avoid the silent runtime errors
"import/no-cycle": 0, // we need to disable this until we can solve the issue with generated in api using Context type...
"@typescript-eslint/no-var-requires": 0, // needed for specific stuff (e.g. honeycomb)
"import/no-named-as-default": 0, // produces issues with apollo-boost,
"import/default": 0, // https://github.com/alexgorbatchev/eslint-import-resolver-typescript/issues/31#issuecomment-539751607
"import/named": 0, // https://github.com/alexgorbatchev/eslint-import-resolver-typescript/issues/31#issuecomment-539751607
"import/no-named-as-default-member": 0 // issues with dayjs
},
"overrides": [
{
"files": [
"*.spec.ts",
"**/__tests__/*"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
}
}
],
"settings": {
"import/extensions": [
".js",
".jsx",
".ts",
".tsx",
".d.ts",
".d.tsx"
],
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx",
".d.ts",
".d.tsx"
]
},
"import/resolver": {
// use <root>/tsconfig.json
"typescript": {
"alwaysTryTypes": true
}
}
}
}