Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Apr 2, 2024
1 parent d7c450c commit 35fccc1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/parser/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const jsToReka = <T extends t.ASTNode = t.ASTNode>(
return convertedNode;
};

let type = _convert(node) as t.ASTNode;
const type = _convert(node) as t.ASTNode;

if (opts?.expectedType) {
invariant(
Expand Down
11 changes: 8 additions & 3 deletions packages/react-code-editor/src/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ type CodeEditorProps = React.DetailedHTMLProps<
React.HTMLAttributes<HTMLDivElement>,
HTMLDivElement
> & {
children?: React.ReactNode;
onStatusChange?: onStatusChangeCb;
extensions?: Extension[];
};

export const CodeEditor = ({ onStatusChange, ...props }: CodeEditorProps) => {
export const CodeEditor = ({
onStatusChange,
extensions,
...props
}: CodeEditorProps) => {
const { reka } = useReka();

const domRef = React.useRef<HTMLDivElement | null>(null);
Expand All @@ -106,8 +111,8 @@ export const CodeEditor = ({ onStatusChange, ...props }: CodeEditorProps) => {
Parser.stringify(reka.program)
);

const extensionsRef = React.useRef<Extension[]>(props.extensions ?? []);
extensionsRef.current = props.extensions || [];
const extensionsRef = React.useRef<Extension[]>(extensions ?? []);
extensionsRef.current = extensions || [];

const isSynchingFromCodeMirror = React.useRef(false);
const isSynchingFromExternal = React.useRef(false);
Expand Down
3 changes: 1 addition & 2 deletions packages/types/src/generated/types.generated.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Schema } from '../schema';

import { Type, TypeConstructorOptions } from '../node';
import { Schema } from '../schema';

type StateParameters = {
program: Program;
Expand Down
3 changes: 2 additions & 1 deletion site/constants/encoded-dummy-program.ts

Large diffs are not rendered by default.

0 comments on commit 35fccc1

Please sign in to comment.