forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (44 loc) · 1.04 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
const allowedModules = require("./allowedModules");
module.exports = {
"env": {
"browser": true,
"commonjs": true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "./"]
}
}
},
"extends": "standard",
"plugins": [
"prebid"
],
"globals": {
"$$PREBID_GLOBAL$$": false
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
"comma-dangle": "off",
"semi": "off",
"space-before-function-paren": "off",
// 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": "off",
"no-useless-escape": "off",
},
"overrides": Object.keys(allowedModules).map((key) => ({
"files": key + "/**/*.js",
"rules": {
"prebid/validate-imports": ["error", allowedModules[key]]
}
}))
};