snappymail/.eslintrc.js
djmaze e7180a86ce Made eslint using 'browser' environment and added globals, because RainLoop is used in browsers.
This also allowed to remove all webpack 'externals' overhead.
2020-08-12 00:25:36 +02:00

63 lines
1.4 KiB
JavaScript

module.exports = {
parser: 'babel-eslint',
// extends: ['eslint:recommended', 'plugin:prettier/recommended'],
extends: ['eslint:recommended'],
plugins: ['prettier'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
env: {
node: true,
browser: true,
es6: true
},
globals: {
// RainLoop
'RL_COMMUNITY': true,
'RL_ES6': true,
'__rlah_set': "readonly",
'__rlah_clear': "readonly",
'__rlah_data': "readonly",
'rainloopI18N': "readonly",
'rainloopTEMPLATES': "readonly",
'rl': "readonly",
// '__APP_BOOT': "readonly",
// deb/boot.js
'progressJs': "readonly",
// others
'jQuery': "readonly",
'openpgp': "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"
},
// http://eslint.org/docs/rules/
rules: {
// plugins
// 'prettier/prettier': 'error',
'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.+;$)'
}
]
}
};