@@ -7,9 +7,11 @@ import { getModulePath } from 'app/store/entities/sandboxes/modules/selectors';
77
88import theme from 'common/theme' ;
99
10+ /* eslint-disable import/no-webpack-loader-syntax */
1011import SyntaxHighlightWorker from 'worker-loader!./monaco/workers/syntax-highlighter' ;
1112import LinterWorker from 'worker-loader!./monaco/workers/linter' ;
1213import TypingsFetcherWorker from 'worker-loader!./monaco/workers/fetch-dependency-typings' ;
14+ /* eslint-enable import/no-webpack-loader-syntax */
1315
1416import enableEmmet from './monaco/enable-emmet' ;
1517import Header from './Header' ;
@@ -46,13 +48,15 @@ const Container = styled.div`
4648 z-index: 30;
4749` ;
4850
51+ /*
4952const fontFamilies = (...families) =>
5053 families
5154 .filter(Boolean)
5255 .map(
5356 family => (family.indexOf(' ') !== -1 ? JSON.stringify(family) : family)
5457 )
5558 .join(', ');
59+ */
5660
5761const CodeContainer = styled . div `
5862 position: relative;
@@ -125,10 +129,7 @@ const handleError = (
125129 monaco ,
126130 editor ,
127131 currentErrors : ?Array < ModuleError > ,
128- nextErrors: ?Array< ModuleError > ,
129- nextCode: ?string,
130- prevId: string,
131- nextId: string
132+ nextErrors: ?Array< ModuleError >
132133) => {
133134 if ( ! monaco ) return ;
134135 if ( nextErrors && nextErrors . length > 0 ) {
@@ -329,7 +330,6 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
329330 swapDocuments = async ( {
330331 currentId ,
331332 nextId ,
332- nextCode ,
333333 nextTitle ,
334334 } : {
335335 currentId : string ,
@@ -488,6 +488,7 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
488488 this . editor = editor ;
489489 this . monaco = monaco ;
490490
491+ // eslint-disable-next-line no-underscore-dangle
491492 window . _cs = {
492493 editor : this . editor ,
493494 monaco : this . monaco ,
@@ -544,7 +545,7 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
544545 label : 'Open Module' ,
545546
546547 // An optional array of keybindings for the action.
547- keybindings : [ monaco . KeyMod . CtrlCmd | monaco . KeyCode . KEY_P ] ,
548+ keybindings : [ monaco . KeyMod . CtrlCmd | monaco . KeyCode . KEY_P ] , // eslint-disable-line no-bitwise
548549
549550 // A precondition for this action.
550551 precondition : null ,
@@ -558,7 +559,7 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
558559
559560 // Method that will be executed when the action is triggered.
560561 // @param editor The editor instance is passed in as a convinience
561- run : ed => {
562+ run : ( ) => {
562563 this . setState ( {
563564 fuzzySearchEnabled : true ,
564565 } ) ;
@@ -579,7 +580,7 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
579580
580581 addKeyCommands = ( ) => {
581582 this . editor . addCommand (
582- this . monaco . KeyMod . CtrlCmd | this . monaco . KeyCode . KEY_S ,
583+ this . monaco . KeyMod . CtrlCmd | this . monaco . KeyCode . KEY_S , // eslint-disable-line no-bitwise
583584 ( ) => {
584585 this . handleSaveCode ( ) ;
585586 }
0 commit comments