Skip to content

Commit

Permalink
Update to latest Depot
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Jul 1, 2024
1 parent 9d3dadc commit 465f25e
Show file tree
Hide file tree
Showing 21 changed files with 311 additions and 924 deletions.
40 changes: 0 additions & 40 deletions js/.eslintrc.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions js/.prettierrc.cjs

This file was deleted.

41 changes: 41 additions & 0 deletions js/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"trailingCommas": "none"
},
"jsxRuntime": "reactClassic"
},
"formatter": {
"indentStyle": "space"
},
"linter": {
"rules": {
"recommended": true,
"a11y": {
"useKeyWithClickEvents": "off",
"useValidAnchor": "off"
},
"correctness": {
"noUnusedImports": "warn",
"useExhaustiveDependencies": "off",
"useJsxKeyInIterable": "off"
},
"style": {
"noNonNullAssertion": "off",
"useConst": "off",
"noUselessElse": "off",
"noParameterAssign": "off"
},
"complexity": {
"noBannedTypes": "off",
"noForEach": "off"
},
"suspicious": {
"noArrayIndexKey": "off",
"noExplicitAny": "off"
}
}
}
}
11 changes: 4 additions & 7 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"private": true,
"depot": {
"depot-version": "0.2.17"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@biomejs/biome": "^1.8.3",
"@types/node": "^20.3.0",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.42.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.8",
"stylelint": "^16.5.0",
"stylelint-config-standard-scss": "^13.1.0",
"typedoc": "^0.24.8",
Expand Down
18 changes: 0 additions & 18 deletions js/packages/quiz-embed/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions js/packages/quiz-embed/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Quiz, QuizView, renderIde } from "@wcrichto/quiz";
import { type Quiz, QuizView, renderIde } from "@wcrichto/quiz";
import * as rustEditor from "@wcrichto/rust-editor";
import React from "react";
import * as ReactDOM from "react-dom/client";
Expand All @@ -10,7 +10,7 @@ let onError = ({ error }: { error: Error }) => {
document.body.style.overflowY = "auto";

window.telemetry?.log("runtime_error", {
error: error.stack || error.message,
error: error.stack || error.message
});

return (
Expand Down
18 changes: 0 additions & 18 deletions js/packages/quiz/.eslintrc.cjs

This file was deleted.

10 changes: 5 additions & 5 deletions js/packages/quiz/src/components/markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from "react";
import { Markdown as Showdown, ShowdownExtension } from "react-showdown";
import { Markdown as Showdown, type ShowdownExtension } from "react-showdown";

import { SnippetOptions, renderIde, snippetToNode } from "./snippet";
import { type SnippetOptions, renderIde, snippetToNode } from "./snippet";

let highlightExtension = (
options?: Partial<SnippetOptions>
Expand All @@ -25,13 +25,13 @@ let highlightExtension = (
let newNode = snippetToNode({
...(options || {}),
snippet: node.textContent!,
language,
language
});
let pre = node.parentNode as HTMLPreElement;
pre.replaceWith(newNode);
});
return document.body.innerHTML;
},
}
});

declare global {
Expand All @@ -45,7 +45,7 @@ export let MarkdownView: React.FC<{
let ref = useRef<HTMLDivElement>(null);
useEffect(() => {
renderIde(ref.current!, snippetOptions);
window.initAquascopeBlocks && window.initAquascopeBlocks(ref.current!);
window.initAquascopeBlocks?.(ref.current!);
}, [markdown]);

return (
Expand Down
Loading

0 comments on commit 465f25e

Please sign in to comment.