forked from the-djmaze/snappymail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (60 loc) · 1.32 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
module.exports = {
parser: 'babel-eslint',
// extends: ['eslint:recommended', 'plugin:prettier/recommended'],
extends: ['eslint:recommended'],
parserOptions: {
ecmaVersion: 11,
sourceType: 'module'
},
env: {
node: true,
browser: true,
es2020: true
},
globals: {
// SnappyMail
'rainloopI18N': "readonly",
'rainloopTEMPLATES': "readonly",
'rl': "readonly",
'shortcuts': "readonly",
// '__APP_BOOT': "readonly",
// deb/boot.js
'progressJs': "readonly",
// others
'openpgp': "readonly",
'CKEDITOR': "readonly",
'Squire': "readonly",
'SquireUI': "readonly",
// node_modules/knockout but dev/External/ko.js is used
'ko': "readonly",
// vendors/routes/
'hasher': "readonly",
'Crossroads': "readonly",
// vendors/jua
'Jua': "readonly",
// vendors/bootstrap/bootstrap.native.js
'BSN': "readonly",
// Mailvelope
'mailvelope': "readonly",
// Punycode
'IDN': "readonly"
},
// http://eslint.org/docs/rules/
rules: {
'no-cond-assign': 0,
// plugins
'no-mixed-spaces-and-tabs': 'off',
'max-len': [
'error',
120,
2,
{
ignoreComments: true,
ignoreUrls: true,
ignoreTrailingComments: true,
ignorePattern: '(^\\s*(const|let|var)\\s.+=\\s*require\\s*\\(|^import\\s.+\\sfrom\\s.+;$)'
}
],
'no-constant-condition': ["error", { "checkLoops": false }]
}
};