Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Oct 27, 2023
1 parent 827e657 commit 53c054b
Show file tree
Hide file tree
Showing 4 changed files with 2,071 additions and 2,828 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,21 @@
"test": "lerna run test"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"jest": "^26.4.2",
"jest-junit": "^11.1.0",
"jest-raw-loader": "^1.0.1",
"jest-summary-reporter": "^0.0.2",
"lerna": "^4.0.0",
"lerna": "^7.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.0",
"prettier": "^2.8.6",
"rimraf": "^3.0.2",
"shell-quote": "^1.7.2",
"typescript": "~4.1.3"
"shell-quote": "^1.7.2"
}
}
16 changes: 10 additions & 6 deletions packages/jupyterlab-preview/src/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,26 @@ export class VoilaPreview extends DocumentWidget<IFrame, INotebookModel> {

window.onmessage = (event: any) => {
//console.log("EVENT: ", event);

switch (event.data?.level) {
const level = event?.data?.level;
const msg = event?.data?.msg;
if (!level || !msg) {
return;
}
switch (level) {
case 'debug':
console.debug(...event.data?.msg);
console.debug(msg);
break;

case 'info':
console.info(...event.data?.msg);
console.info(msg);
break;

case 'warn':
console.warn(...event.data?.msg);
console.warn(msg);
break;

case 'error':
console.error(...event.data?.msg);
console.error(msg);
break;

default:
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": "./tsconfigbase",
"include": ["packages/**/*", "ui-tests"],
"types": ["jest"]
"compilerOptions": {
"types": ["jest"]
}
}

0 comments on commit 53c054b

Please sign in to comment.