Protect the global name space from the code editor
This commit is contained in:
committed by
Berkeley Martinez
parent
e50fbc05ca
commit
1126bf7004
@@ -11,14 +11,17 @@ import CodeMirrorSkeleton from '../../Code-Mirror-Skeleton.jsx';
|
|||||||
import {
|
import {
|
||||||
executeChallenge,
|
executeChallenge,
|
||||||
classicEditorUpdated,
|
classicEditorUpdated,
|
||||||
|
|
||||||
challengeMetaSelector,
|
challengeMetaSelector,
|
||||||
filesSelector,
|
filesSelector,
|
||||||
keySelector
|
keySelector
|
||||||
} from '../../redux';
|
} from '../../redux';
|
||||||
|
|
||||||
|
const envProps = typeof window !== 'undefined' ? Object.keys(window) : [];
|
||||||
const options = {
|
const options = {
|
||||||
lint: { esversion: 6 },
|
lint: {
|
||||||
|
esversion: 6,
|
||||||
|
predef: envProps
|
||||||
|
},
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
mode: 'javascript',
|
mode: 'javascript',
|
||||||
theme: 'freecodecamp',
|
theme: 'freecodecamp',
|
||||||
|
Reference in New Issue
Block a user