-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
58 lines (56 loc) · 1.39 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
module.exports = {
env: {
browser: true,
es6: true,
mocha: true
},
extends: [
'airbnb-base',
'plugin:import/typescript'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
settings: {
"import/resolver": {
typescript: {} // this loads <rootdir>/tsconfig.json to eslint
},
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'fp',
'security'
],
rules: {
"import/extensions": ["off", "never" | "always" | "ignorePackages"],
"max-len": ["off", "never" | "always" | "ignorePackages"],
"import/prefer-default-export": ["off", "never" | "always" | "ignorePackages"],
"no-unused-vars": ["off", "never" | "always" | "ignorePackages"],
"indent": ["error", 4],
// embrace functional programming
"no-var": "error",
"fp/no-class": "error",
"fp/no-delete": "error",
"fp/no-events": "error",
"fp/no-let": "error",
"fp/no-loops": "error",
"fp/no-mutating-assign": "error",
"fp/no-mutation": ['error', {
exceptions: [{
object: 'module',
property: 'exports',
}]
}],
"fp/no-nil": "error",
//"fp/no-proxy": "error",
"fp/no-this": "error",
"fp/no-throw": "error",
//"fp/no-unused-expression": "error",
},
};