Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { DEFAULT_CODE, DEFAULT_CONFIG } from "../config";
import { BrowserLinter } from "../linter";
import { decodeUrl, encodeUrl, failureToMarker } from "../utils";
import { CodeEditor } from "./CodeEditor";
type WindowType = "code" | "config" | "output";
export interface IAppState {
config: string;
code: string;
lintResult: LintResult | undefined;
windowLayout: MosaicNode;
configError: boolean;
}
const TslintMosaic = Mosaic.ofType();
const TslintMosaicWindow = MosaicWindow.ofType();
const capitalizeFirstLetter = (str: string) => {
return str.charAt(0).toUpperCase() + str.slice(1);
};
class App extends React.Component<{}, IAppState> {
public linter: BrowserLinter;
public state: IAppState = {
code: DEFAULT_CODE,
config: DEFAULT_CONFIG,
configError: false,
lintResult: undefined,
windowLayout: {
direction: "column",
first: {