snappymail/.eslintrc.js

65 lines
1.4 KiB
JavaScript
Raw Normal View History

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: {
2024-04-03 04:24:53 +08:00
ecmaVersion: 11,
2019-07-05 03:09:27 +08:00
sourceType: 'module'
},
env: {
node: true,
browser: true,
2021-12-29 00:13:15 +08:00
es2020: true
2019-07-05 03:09:27 +08:00
},
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",
2020-09-11 18:39:56 +08:00
'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
2024-08-26 00:04:59 +08:00
'IDN': "readonly",
// Turndown
'TurndownService': "readonly",
// Marked
'marked': "readonly"
2019-07-05 03:09:27 +08:00
},
// http://eslint.org/docs/rules/
rules: {
'no-cond-assign': 0,
2019-07-05 03:09:27 +08:00
// 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.+;$)'
}
2022-03-24 20:41:41 +08:00
],
'no-constant-condition': ["error", { "checkLoops": false }]
2019-07-05 03:09:27 +08:00
}
};