2019-07-05 03:09:27 +08:00
|
|
|
module.exports = {
|
|
|
|
parser: 'babel-eslint',
|
2020-03-11 21:17:52 +08:00
|
|
|
// extends: ['eslint:recommended', 'plugin:prettier/recommended'],
|
|
|
|
extends: ['eslint:recommended'],
|
2019-07-05 03:09:27 +08:00
|
|
|
parserOptions: {
|
|
|
|
ecmaVersion: 6,
|
|
|
|
sourceType: 'module'
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
node: true,
|
2020-08-12 06:25:36 +08:00
|
|
|
browser: true,
|
2019-07-05 03:09:27 +08:00
|
|
|
es6: true
|
|
|
|
},
|
|
|
|
globals: {
|
2020-09-26 06:02:29 +08:00
|
|
|
// SnappyMail
|
2020-08-12 06:25:36 +08:00
|
|
|
'rainloopI18N': "readonly",
|
|
|
|
'rainloopTEMPLATES': "readonly",
|
|
|
|
'rl': "readonly",
|
2020-09-26 06:02:29 +08:00
|
|
|
'shortcuts': "readonly",
|
2020-08-12 06:25:36 +08:00
|
|
|
// '__APP_BOOT': "readonly",
|
|
|
|
// deb/boot.js
|
|
|
|
'progressJs': "readonly",
|
|
|
|
// others
|
|
|
|
'openpgp': "readonly",
|
2020-09-09 23:03:44 +08:00
|
|
|
'CKEDITOR': "readonly",
|
|
|
|
'Squire': "readonly",
|
2020-09-11 18:39:56 +08:00
|
|
|
'SquireUI': "readonly",
|
2020-08-12 06:25:36 +08:00
|
|
|
// node_modules/knockout but dev/External/ko.js is used
|
2020-10-20 23:39:00 +08:00
|
|
|
'ko': "readonly",
|
2021-02-12 19:00:06 +08:00
|
|
|
// dev/External/ifvisible.js
|
|
|
|
'ifvisible': "readonly",
|
2020-08-12 06:25:36 +08:00
|
|
|
// vendors/routes/
|
|
|
|
'hasher': "readonly",
|
|
|
|
'Crossroads': "readonly",
|
|
|
|
// vendors/jua
|
|
|
|
'Jua': "readonly",
|
|
|
|
// vendors/qr.js
|
2020-08-30 16:30:50 +08:00
|
|
|
'qr': "readonly",
|
|
|
|
// vendors/bootstrap/bootstrap.native.js
|
|
|
|
'BSN': "readonly"
|
2019-07-05 03:09:27 +08:00
|
|
|
},
|
|
|
|
// http://eslint.org/docs/rules/
|
|
|
|
rules: {
|
|
|
|
// plugins
|
2020-03-11 21:17:52 +08:00
|
|
|
'no-mixed-spaces-and-tabs': 'off',
|
2019-07-05 03:09:27 +08:00
|
|
|
'max-len': [
|
|
|
|
'error',
|
|
|
|
120,
|
|
|
|
2,
|
|
|
|
{
|
|
|
|
ignoreComments: true,
|
|
|
|
ignoreUrls: true,
|
|
|
|
ignoreTrailingComments: true,
|
|
|
|
ignorePattern: '(^\\s*(const|let|var)\\s.+=\\s*require\\s*\\(|^import\\s.+\\sfrom\\s.+;$)'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|