forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build Process: avoid Eslint spread operator error (prebid#7313)
* Eslint: avoid spread operator error * Lint config files * Include all .js files with `gulp lint`
- Loading branch information
Showing
9 changed files
with
141 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,53 @@ | ||
|
||
const allowedModules = require("./allowedModules"); | ||
const allowedModules = require('./allowedModules.js'); | ||
|
||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"commonjs": true | ||
env: { | ||
browser: true, | ||
commonjs: true | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"moduleDirectory": ["node_modules", "./"] | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
moduleDirectory: ['node_modules', './'] | ||
} | ||
} | ||
}, | ||
"extends": "standard", | ||
"plugins": [ | ||
"prebid", | ||
"import" | ||
extends: 'standard', | ||
plugins: [ | ||
'prebid', | ||
'import' | ||
], | ||
"globals": { | ||
"$$PREBID_GLOBAL$$": false | ||
globals: { | ||
'$$PREBID_GLOBAL$$': false, | ||
'BROWSERSTACK_USERNAME': false, | ||
'BROWSERSTACK_KEY': false | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2018, | ||
}, | ||
"rules": { | ||
"comma-dangle": "off", | ||
"semi": "off", | ||
"space-before-function-paren": "off", | ||
"import/extensions": ["error", "ignorePackages"], | ||
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" | ||
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]] | ||
overrides: Object.keys(allowedModules).map((key) => ({ | ||
files: key + '/**/*.js', | ||
rules: { | ||
'prebid/validate-imports': ['error', allowedModules[key]] | ||
} | ||
})) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
module.exports = (function(settings) { | ||
var browsers = require('./browsers.json'); | ||
delete browsers['bs_ie_9_windows_7']; | ||
|
||
for(var browser in browsers) { | ||
if(browsers[browser].browser === 'iphone') continue; | ||
var browsers = require('./browsers.json'); | ||
delete browsers['bs_ie_9_windows_7']; | ||
|
||
var desiredCapabilities = { | ||
"browserName": browsers[browser].browser, | ||
"version": browsers[browser].browser_version, | ||
"platform": browsers[browser].os, | ||
"os": browsers[browser].os, | ||
"os_version": browsers[browser].os_version, | ||
"browser": browsers[browser].browser, | ||
"browser_version": browsers[browser].browser_version, | ||
}; | ||
for (var browser in browsers) { | ||
if (browsers[browser].browser === 'iphone') continue; | ||
|
||
settings.test_settings[browser] = { | ||
"silent": true, | ||
"exclude":["custom-assertions","custom-commands","common","custom-reporter"], | ||
"screenshots" : { | ||
"enabled" : false, | ||
"path" : "" | ||
}, | ||
"javascriptEnabled": true, | ||
"acceptSslCerts": true, | ||
"browserstack.local": true, | ||
"browserstack.debug": true, | ||
"browserstack.selenium_version" : "2.53.0", | ||
"browserstack.user": "${BROWSERSTACK_USERNAME}", | ||
"browserstack.key": "${BROWSERSTACK_KEY}" | ||
}; | ||
settings.test_settings[browser]['desiredCapabilities'] = desiredCapabilities; | ||
} | ||
return settings; | ||
var desiredCapabilities = { | ||
'browserName': browsers[browser].browser, | ||
'version': browsers[browser].browser_version, | ||
'platform': browsers[browser].os, | ||
'os': browsers[browser].os, | ||
'os_version': browsers[browser].os_version, | ||
'browser': browsers[browser].browser, | ||
'browser_version': browsers[browser].browser_version, | ||
}; | ||
|
||
settings.test_settings[browser] = { | ||
'silent': true, | ||
'exclude': ['custom-assertions', 'custom-commands', 'common', 'custom-reporter'], | ||
'screenshots': { | ||
'enabled': false, | ||
'path': '' | ||
}, | ||
'javascriptEnabled': true, | ||
'acceptSslCerts': true, | ||
'browserstack.local': true, | ||
'browserstack.debug': true, | ||
'browserstack.selenium_version': '2.53.0', | ||
'browserstack.user': `${BROWSERSTACK_USERNAME}`, | ||
'browserstack.key': `${BROWSERSTACK_KEY}` | ||
}; | ||
settings.test_settings[browser]['desiredCapabilities'] = desiredCapabilities; | ||
} | ||
return settings; | ||
})(require('./nightwatch.browserstack.json')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"mocha": true | ||
env: { | ||
browser: true, | ||
mocha: true | ||
}, | ||
"extends": "standard", | ||
"globals": { | ||
"$$PREBID_GLOBAL$$": false | ||
extends: 'standard', | ||
globals: { | ||
'$$PREBID_GLOBAL$$': false | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
"rules": { | ||
"comma-dangle": "off", | ||
"semi": "off", | ||
"space-before-function-paren": "off", | ||
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. | ||
"camelcase": "off", | ||
"eqeqeq": "off", | ||
"no-mixed-spaces-and-tabs": "off", | ||
"no-tabs": "off", | ||
"no-unused-expressions": "off", | ||
"import/no-duplicates": "off", | ||
"import/extensions": "off", | ||
"no-template-curly-in-string": "off", | ||
"no-global-assign": "off", | ||
"no-path-concat": "off", | ||
"no-redeclare": "off", | ||
"node/no-deprecated-api": "off", | ||
"no-return-assign": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-escape": "off", | ||
"one-var": "off" | ||
camelcase: 'off', | ||
eqeqeq: 'off', | ||
'no-mixed-spaces-and-tabs': 'off', | ||
'no-tabs': 'off', | ||
'no-unused-expressions': 'off', | ||
'import/no-duplicates': 'off', | ||
'import/extensions': 'off', | ||
'no-template-curly-in-string': 'off', | ||
'no-global-assign': 'off', | ||
'no-path-concat': 'off', | ||
'no-redeclare': 'off', | ||
'node/no-deprecated-api': 'off', | ||
'no-return-assign': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
'no-use-before-define': 'off', | ||
'no-useless-escape': 'off', | ||
'one-var': 'off' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters