Micah Stubbs 908522e105
Micah/157/prettier (#166)
* 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
2018-02-23 16:34:43 -08:00

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"
}