mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Don't allow global access to all of window
We had a bug where `stop()` was undefined but it fell back to the function on window which was inplicitly in the global scope. This should reduce that kind of thing.
This commit is contained in:
parent
0472033fba
commit
e79520dbdd
2 changed files with 21 additions and 3 deletions
23
.eslintrc
23
.eslintrc
|
|
@ -28,15 +28,32 @@
|
|||
}
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"amd": true,
|
||||
"es6": true,
|
||||
"jest": true
|
||||
},
|
||||
// TODO: Consider removing some of these.
|
||||
// https://github.com/facebook/create-react-app/pull/1840
|
||||
// Create React App and "Standard" only allow the following:
|
||||
// * document
|
||||
// * window
|
||||
// * console
|
||||
// * navigator
|
||||
"globals": {
|
||||
"page": true,
|
||||
"browser": true
|
||||
"window": true,
|
||||
"document": true,
|
||||
"console": true,
|
||||
"navigator": true,
|
||||
"alert": true,
|
||||
"Blob": true,
|
||||
"fetch": true,
|
||||
"FileReader": true,
|
||||
"Element": true,
|
||||
"AudioNode": true,
|
||||
"MutationObserver": true,
|
||||
"Image": true,
|
||||
"location": true
|
||||
},
|
||||
"rules": {
|
||||
"no-multiple-empty-lines": [
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* global page */
|
||||
const { toMatchImageSnapshot } = require("jest-image-snapshot");
|
||||
|
||||
expect.extend({ toMatchImageSnapshot });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue