snappymail/.eslintrc.js

63 lines
1.3 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
plugins: ['prettier'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
env: {
node: true,
browser: true,
2019-07-05 03:09:27 +08:00
es6: true
},
globals: {
// RainLoop
'rainloopI18N': "readonly",
'rainloopTEMPLATES': "readonly",
'rl': "readonly",
// '__APP_BOOT': "readonly",
// deb/boot.js
'progressJs': "readonly",
// others
'jQuery': "readonly",
'openpgp': "readonly",
'CKEDITOR': "readonly",
'Squire': "readonly",
// node_modules/knockout but dev/External/ko.js is used
// 'ko': "readonly",
// node_modules/simplestatemanager
'ssm': "readonly",
// vendors/routes/
'hasher': "readonly",
'signals': "readonly",
'Crossroads': "readonly",
// vendors/keymaster
'key': "readonly",
// vendors/jua
'Jua': "readonly",
// vendors/qr.js
'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
// 'prettier/prettier': 'error',
'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.+;$)'
}
]
}
};