Skip to content

Commit 3b99137

Browse files
fix lint issues
1 parent 714cc29 commit 3b99137

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"jest.config.ts",
9898
"docusaurus.config.mts",
9999
"mdx-components.tsx",
100+
"prepare-assets.ts",
100101
"typings/**"
101102
],
102103
"extends": ["plugin:@typescript-eslint/disable-type-checked"]

packages/cursorless-org-docs/scripts/prepare-assets.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ interface Fixture {
2424
const fixtures: Fixture[] = [];
2525

2626
for (const test of getScopeTestPaths()) {
27-
// if (test.languageId !== "xml" || test.facet !== "tags") {
28-
// continue;
29-
// }
3027
const fixture = parseTest(test);
3128
if (fixture != null) {
3229
fixtures.push(fixture);
@@ -51,7 +48,6 @@ function parseTest(test: ScopeTestPath) {
5148
const lines = fixture.substring(delimiterIndex + 4).split(/\n/);
5249
const scopes: Scope[] = [];
5350
const unprocessedTypes: string[] = [];
54-
const unprocessedTargets: Scope[] = [];
5551
let currentScopeIndex = "";
5652
let currentScope: Scope = {};
5753

@@ -106,8 +102,6 @@ function parseTest(test: ScopeTestPath) {
106102
return;
107103
}
108104

109-
// console.log(scopeIndex, targetIndex, type, value);
110-
111105
if (scopeIndex != null && scopeIndex !== currentScopeIndex) {
112106
if (currentScopeIndex !== "") {
113107
scopes.push(currentScope);

packages/cursorless-org-docs/src/docs/user/languages/components/Code.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import { Range } from "@cursorless/common";
1+
import type { Range } from "@cursorless/common";
22
import React, { useEffect, useState } from "react";
3-
import {
4-
codeToHtml,
5-
createCssVariablesTheme,
6-
type DecorationItem,
7-
} from "shiki";
3+
import { codeToHtml, type DecorationItem } from "shiki";
84
import "./Code.css";
95

106
export interface Highlight {
@@ -19,8 +15,6 @@ interface Props {
1915
children: string;
2016
}
2117

22-
const myTheme = createCssVariablesTheme();
23-
2418
export function Code({
2519
languageId,
2620
renderWhitespace,
@@ -39,7 +33,9 @@ export function Code({
3933
lang: languageId,
4034
theme: "nord",
4135
decorations: getDecorations(highlights),
42-
}).then(setHtml);
36+
})
37+
.then(setHtml)
38+
.catch(console.error);
4339
}, [languageId, renderWhitespace, highlights, children]);
4440

4541
const handleCopy = async () => {

packages/cursorless-org-docs/src/docs/user/languages/components/ScopeVisualizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Range } from "@cursorless/common";
22
import React, { useState } from "react";
33
import scopeTestsExport from "../../../../../static/scopeTests.json";
4-
import { Code, Highlight } from "./Code";
4+
import { Code, type Highlight } from "./Code";
55

66
type RangeType = "content" | "removal";
77

0 commit comments

Comments
 (0)