mirror of
https://github.com/heavyai/heavyai-charting.git
synced 2026-01-25 14:57:45 +00:00
* update eslint config * use .js for .eslintrc since we want comments, which aren't valid json * fix export in .eslintrc.js * add yarn format scripts * add --fix to eslint command * yarn lint --fix * prettier ignore particularly gnarly files that cause errors when formatted * yarn format to prettier format codebase * yarn lint --fix * yarn build * restore yarn lint script without --fix, add dedicated yarn lint:fix script * remove new eslint rules from mapd-connector introduced inadvertently * remove a few more errant new eslintrc config items * one more .eslintrc point of consistency * add yarn format:check:lint script that will error if there are formatting or linting errors * add prettierrc config file, no semicolons * yarn format * yarn lint --fix * update .prettierignore, don't format polyfill
18 lines
413 B
JavaScript
18 lines
413 B
JavaScript
var jsdom = require("jsdom").jsdom
|
|
|
|
var exposedProperties = ["window", "navigator", "document"]
|
|
|
|
global.document = jsdom("")
|
|
global.window = document.defaultView
|
|
|
|
Object.keys(document.defaultView).forEach(property => {
|
|
if (typeof global[property] === "undefined") {
|
|
exposedProperties.push(property)
|
|
global[property] = document.defaultView[property]
|
|
}
|
|
})
|
|
|
|
global.navigator = {
|
|
userAgent: "node.js"
|
|
}
|