-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
90 lines (85 loc) · 2.21 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
78
79
80
81
82
83
84
85
86
87
88
89
90
{
"root": true,
"ignorePatterns": ["**/*"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.*?.json",
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier", "import", "functional"],
"extends": [
"airbnb-base", // Includes import plugin
"plugin:import/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
// Prettier
"prettier/prettier": ["warn"],
// JavaScript
"no-use-before-define": "off",
"no-shadow": "off",
// TypeScript
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "all",
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "generic",
"readonly": "generic"
}
],
"@typescript-eslint/no-explicit-any": "error",
// Import
// Can't make `no-unresolved` working with `@typescript-eslint/parser`
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "off",
"import/default": "off",
"import/extensions": ["error", "never", { "json": "always" }],
// Functional -> https://github.com/jonaskello/eslint-plugin-functional#readme
"functional/immutable-data": [
"error",
{
"ignorePattern": ["^mutable"]
}
],
"functional/no-let": [
"warn",
{
"ignorePattern": ["^mutable"]
}
],
"functional/prefer-readonly-type": [
"warn",
{
"ignorePattern": ["^mutable"],
"ignoreCollections": true
}
]
// IMPORTANT: JavaScript formatting rules are handled by prettier
},
"overrides": [
{
// JavaScript files
"files": ["**/*.js"],
"rules": {
"functional/immutable-data": ["off"]
}
}
]
}