forked from the-djmaze/snappymail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
57 lines (57 loc) · 1.26 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
module.exports = {
parser: 'babel-eslint',
// extends: ['eslint:recommended', 'plugin:prettier/recommended'],
extends: ['eslint:recommended'],
parserOptions: {
ecmaVersion: 6,
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"
},
// http://eslint.org/docs/rules/
rules: {
// 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 }]
}
};