Commit 3a527f2a authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Revert "Forbid using window properties as global variables" (#2099)

* Revert "Ignore the yarn cache directory (#2063)"

This reverts commit 94149c77.

* Revert "Forbid using window properties as global variables (#1840)"

This reverts commit 5a7d8e89.
parent 94149c77
Showing with 5 additions and 11 deletions
+5 -11
...@@ -26,19 +26,13 @@ module.exports = { ...@@ -26,19 +26,13 @@ module.exports = {
plugins: ['import', 'flowtype', 'jsx-a11y', 'react'], plugins: ['import', 'flowtype', 'jsx-a11y', 'react'],
env: { env: {
browser: true,
commonjs: true, commonjs: true,
es6: true, es6: true,
jest: true, jest: true,
node: true, node: true,
}, },
globals: {
document: true,
window: true,
console: true,
navigator: true
},
parserOptions: { parserOptions: {
ecmaVersion: 6, ecmaVersion: 6,
sourceType: 'module', sourceType: 'module',
......
...@@ -26,7 +26,7 @@ class BuiltEmitter extends Component { ...@@ -26,7 +26,7 @@ class BuiltEmitter extends Component {
} }
handleReady() { handleReady() {
document.dispatchEvent(new window.Event('ReactFeatureDidMount')); document.dispatchEvent(new Event('ReactFeatureDidMount'));
} }
render() { render() {
...@@ -54,7 +54,7 @@ class App extends Component { ...@@ -54,7 +54,7 @@ class App extends Component {
} }
componentDidMount() { componentDidMount() {
const feature = window.location.hash.slice(1); const feature = location.hash.slice(1);
switch (feature) { switch (feature) {
case 'array-destructuring': case 'array-destructuring':
import( import(
......
...@@ -11,7 +11,7 @@ import React from 'react'; ...@@ -11,7 +11,7 @@ import React from 'react';
import aFileWithoutExt from './assets/aFileWithoutExt'; import aFileWithoutExt from './assets/aFileWithoutExt';
const text = aFileWithoutExt.includes('base64') const text = aFileWithoutExt.includes('base64')
? window.atob(aFileWithoutExt.split('base64,')[1]).trim() ? atob(aFileWithoutExt.split('base64,')[1]).trim()
: aFileWithoutExt; : aFileWithoutExt;
export default () => ( export default () => (
......
...@@ -11,7 +11,7 @@ import React from 'react'; ...@@ -11,7 +11,7 @@ import React from 'react';
import aFileWithExtUnknown from './assets/aFileWithExt.unknown'; import aFileWithExtUnknown from './assets/aFileWithExt.unknown';
const text = aFileWithExtUnknown.includes('base64') const text = aFileWithExtUnknown.includes('base64')
? window.atob(aFileWithExtUnknown.split('base64,')[1]).trim() ? atob(aFileWithExtUnknown.split('base64,')[1]).trim()
: aFileWithExtUnknown; : aFileWithExtUnknown;
export default () => ( export default () => (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment