Skip to content

Commit

Permalink
Fix lints and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrawal-d committed Nov 24, 2023
1 parent d6bdcb3 commit 50127cc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "always"
"proseWrap": "always",
"endOfLine": "crlf"
}
3 changes: 2 additions & 1 deletion src/companion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { spawn } from 'child_process';
import { getJudgeViewProvider } from './extension';
import { words_in_text } from './utilsPure';
import telmetry from './telmetry';
import os from 'os';

const emptyResponse: CphEmptyResponse = { empty: true };
let savedResponse: CphEmptyResponse | CphSubmitResponse = emptyResponse;
Expand All @@ -26,7 +27,7 @@ const COMPANION_LOGGING = false;
export const submitKattisProblem = (problem: Problem) => {
globalThis.reporter.sendTelemetryEvent(telmetry.SUBMIT_TO_KATTIS);
const srcPath = problem.srcPath;
const homedir = require('os').homedir();
const homedir = os.homedir();
let submitPath = `${homedir}/.kattis/submit.py`;
if (process.platform == 'win32') {
if (
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint no-var: off */
import TelemetryReporter from '@vscode/extension-telemetry';
import * as vscode from 'vscode';

Expand Down
5 changes: 3 additions & 2 deletions src/webview/frontend/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect, useReducer } from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import {
Problem,
WebviewToVSEvent,
Expand Down Expand Up @@ -678,4 +678,5 @@ function App() {
}
}

ReactDOM.render(<App />, document.getElementById('app'));
const root = createRoot(document.getElementById('app')!);
root.render(<App />);

0 comments on commit 50127cc

Please sign in to comment.