forked from integralads/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (50 loc) · 1.19 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
const allowedModules = require('./allowedModules.js');
module.exports = {
env: {
browser: true,
commonjs: true
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', './']
}
}
},
extends: 'standard',
plugins: [
'prebid',
'import'
],
globals: {
'$$PREBID_GLOBAL$$': false,
'BROWSERSTACK_USERNAME': false,
'BROWSERSTACK_KEY': false
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
},
rules: {
'comma-dangle': 'off',
semi: 'off',
'space-before-function-paren': 'off',
'import/extensions': ['error', 'ignorePackages'],
// Exceptions below this line are temporary, so that eslint can be added into the CI process.
// Violations of these styles should be fixed, and the exceptions removed over time.
//
// See Issue #1111.
eqeqeq: 'off',
'no-return-assign': 'off',
'no-throw-literal': 'off',
'no-undef': 2,
'no-useless-escape': 'off',
'no-console': 'error'
},
overrides: Object.keys(allowedModules).map((key) => ({
files: key + '/**/*.js',
rules: {
'prebid/validate-imports': ['error', allowedModules[key]]
}
}))
};