Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions oxlint.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const disabledRules = [
"import/no-relative-parent-imports",
"import/prefer-default-export",
"node/callback-return",
"node/no-sync",
Comment thread
AndreasArvidsson marked this conversation as resolved.
"oxc/no-async-await",
"oxc/no-barrel-file",
"oxc/no-map-spread",
Expand All @@ -64,6 +65,7 @@ const disabledRules = [
"typescript/promise-function-async",
"typescript/strict-void-return",
"unicorn/filename-case",
"unicorn/max-nested-calls",
"unicorn/no-array-callback-reference",
"unicorn/no-lonely-if",
"unicorn/no-negated-condition",
Expand All @@ -73,6 +75,7 @@ const disabledRules = [
"unicorn/prefer-at",
"unicorn/prefer-event-target",
"unicorn/prefer-module",
"unicorn/prefer-number-coercion",
"unicorn/prefer-query-selector",
"unicorn/prefer-single-call",
"unicorn/prefer-spread",
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"fix:ts": "oxlint -c oxlint.config.mts --fix .",
"fix:style": "stylelint --ignore-path .gitignore --fix '**/*.{css,scss}'",
"fix:fmt": "oxfmt .",
"fix": "pnpm fix:meta && pnpm fix:syncpack && pnpm fix:ts && pnpm fix:style && pnpm fix:fmt",
"init-vscode-sandbox": "pnpm -F @cursorless/app-vscode init-launch-sandbox",
"meta-updater": "env NODE_OPTIONS=--import=tsx meta-updater",
"preinstall": "npx only-allow pnpm",
Expand All @@ -38,14 +39,14 @@
"@types/node": "^24.13.2",
"esbuild": "^0.28.1",
"eslint-plugin-mocha": "^11.3.0",
"oxfmt": "^0.55.0",
"oxlint": "^1.70.0",
"oxlint-tsgolint": "^0.23.0",
"stylelint": "^17.13.0",
"oxfmt": "^0.57.0",
"oxlint": "^1.72.0",
"oxlint-tsgolint": "^0.24.0",
"stylelint": "^17.14.0",
"stylelint-config-standard": "^40.0.0",
"stylelint-config-standard-scss": "^17.0.0",
"syncpack": "^15.3.2",
"tsx": "^4.22.4",
"tsx": "^4.22.5",
"typescript": "^6.0.3"
},
"pnpm": {
Expand Down
12 changes: 6 additions & 6 deletions packages/app-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1319,9 +1319,9 @@
"itertools": "^2.7.1",
"lodash-es": "^4.18.1",
"nearley": "^2.20.1",
"semver": "^7.8.4",
"semver": "^7.8.5",
"trie-search": "^2.2.1",
"uuid": "^14.0.0",
"uuid": "^14.0.1",
"vscode-uri": "^3.1.0"
},
"devDependencies": {
Expand All @@ -1331,12 +1331,12 @@
"@types/nearley": "^2.11.5",
"@types/node": "^24.13.2",
"@types/semver": "^7.7.1",
"@types/sinon": "^21.0.1",
"@types/sinon": "^22.0.0",
"@types/vscode": "1.98.0",
"esbuild": "^0.28.1",
"fast-xml-parser": "^5.9.1",
"fs-extra": "^11.3.5",
"fast-xml-parser": "^5.9.3",
"fs-extra": "^11.3.6",
"sinon": "^22.0.0",
"tsx": "^4.22.4"
"tsx": "^4.22.5"
}
}
4 changes: 2 additions & 2 deletions packages/app-web-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "docusaurus build --out-dir out"
},
"dependencies": {
"@algolia/client-search": "^5.55.0",
"@algolia/client-search": "^5.55.1",
"@cursorless/lib-common": "workspace:*",
"@docsearch/react": "^4.6.3",
"@docusaurus/core": "^3.10.1",
Expand All @@ -38,7 +38,7 @@
"prism-react-renderer": "^2.4.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"shiki": "^4.2.0",
"shiki": "^4.3.0",
"unist-util-visit": "^5.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/app-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"@cursorless/lib-cheatsheet": "workspace:*",
"@cursorless/lib-common": "workspace:*",
"bootstrap": "^5.3.8",
"preact": "^10.29.2",
"preact": "^10.29.3",
"react-player": "^3.4.0",
"wouter-preact": "^3.10.0"
},
"devDependencies": {
"@types/node": "^24.13.2",
"typescript": "^6.0.3",
"vite": "^8.0.16",
"vite": "^8.1.3",
"vite-plugin-purgecss": "^0.2.13",
"vite-plugin-svgr": "^5.2.0"
}
Expand Down
40 changes: 20 additions & 20 deletions packages/app-web/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Light.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-Light.ttf") format("truetype");
}

@font-face {
Expand All @@ -102,8 +102,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Regular.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-Regular.ttf") format("truetype");
}

@font-face {
Expand All @@ -113,8 +113,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Medium.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-Medium.ttf") format("truetype");
}

@font-face {
Expand All @@ -124,8 +124,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-SemiBold.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-SemiBold.ttf") format("truetype");
}

@font-face {
Expand All @@ -135,8 +135,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-Bold.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-Bold.ttf") format("truetype");
}

@font-face {
Expand All @@ -146,8 +146,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata_SemiExpanded-ExtraBold.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata_SemiExpanded-ExtraBold.ttf") format("truetype");
}

@font-face {
Expand All @@ -157,8 +157,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata-ExtraLight.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata-ExtraLight.ttf") format("truetype");
}

@font-face {
Expand All @@ -178,8 +178,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata-Regular.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata-Regular.ttf") format("truetype");
}

@font-face {
Expand All @@ -189,8 +189,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata-Medium.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata-Medium.ttf") format("truetype");
}

@font-face {
Expand All @@ -200,8 +200,8 @@
font-stretch: 1% 500%; /* Required by Chrome */
src:
local(""),
/* Modern Browsers */ url("/fonts/Inconsolata-SemiBold.ttf")
format("truetype");
/* Modern Browsers */
url("/fonts/Inconsolata-SemiBold.ttf") format("truetype");
}

@font-face {
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-cheatsheet-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"@cursorless/lib-cheatsheet": "workspace:*",
"@cursorless/lib-common": "workspace:*",
"bootstrap": "^5.3.8",
"preact": "^10.29.2"
"preact": "^10.29.3"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^24.13.2",
"jest": "^30.4.2",
"typescript": "^6.0.3",
"vite": "^8.0.16",
"vite": "^8.1.3",
"vite-plugin-purgecss": "^0.2.13",
"vite-plugin-singlefile": "^2.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-cheatsheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@cursorless/lib-common": "workspace:*",
"preact": "^10.29.2",
"preact": "^10.29.3",
"react-bootstrap-icons": "^1.11.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"cross-spawn": "^7.0.6",
"fast-check": "^4.8.0",
"js-yaml": "^4.2.0",
"web-tree-sitter": "^0.26.9"
"web-tree-sitter": "^0.26.10"
}
}
6 changes: 3 additions & 3 deletions packages/lib-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
"@cursorless/lib-node-common": "workspace:*",
"@cursorless/lib-sentence-parser": "workspace:*",
"@cursorless/talon-tools": "^0.11.0",
"immer": "^11.1.8",
"immer": "^11.1.9",
"immutability-helper": "^3.1.1",
"itertools": "^2.7.1",
"lodash-es": "^4.18.1",
"moo": "^0.5.3",
"nearley": "^2.20.1",
"uuid": "^14.0.0",
"uuid": "^14.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/lodash-es": "^4.17.12",
"@types/mocha": "^10.0.10",
"@types/moo": "^0.5.10",
"@types/nearley": "^2.11.5",
"web-tree-sitter": "^0.26.9"
"web-tree-sitter": "^0.26.10"
}
}
2 changes: 1 addition & 1 deletion packages/lib-neovim-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@cursorless/lib-node-common": "workspace:*",
"lodash-es": "^4.18.1",
"neovim": "^5.4.0",
"uuid": "^14.0.0",
"uuid": "^14.0.1",
"vscode-uri": "^3.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-node-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"dependencies": {
"@cursorless/lib-common": "workspace:*",
"fast-glob": "^3.3.3",
"immer": "^11.1.8",
"immer": "^11.1.9",
"lodash-es": "^4.18.1",
"node-html-parser": "^7.1.0"
"node-html-parser": "^8.0.4"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@cursorless/lib-common": "workspace:*",
"@cursorless/lib-engine": "workspace:*",
"immer": "^11.1.8",
"immer": "^11.1.9",
"lodash-es": "^4.18.1"
},
"devDependencies": {
Expand Down
10 changes: 6 additions & 4 deletions packages/lib-tutorial/src/TutorialStepParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {
Hats,
StringRecord,
TutorialContentProvider,
TutorialId,
TutorialStepFragment,
Expand Down Expand Up @@ -31,8 +32,7 @@ export class TutorialStepParser {
/**
* A map of component type to a function that parses the component.
*/
private componentParsers: Record<
string,
private componentParsers: StringRecord<
(arg: string) => Promise<StepComponent>
>;

Expand Down Expand Up @@ -153,12 +153,14 @@ export class TutorialStepParser {

currentIndex = index + length;

const result = await this.componentParsers[type](arg);
const componentParser = this.componentParsers[type];

if (result == null) {
if (componentParser == null) {
throw new Error(`Unknown component type: ${type}`);
}

const result = await componentParser(arg);

const { content, ...rest } = result;

lineContent.push(content);
Expand Down
6 changes: 5 additions & 1 deletion packages/lib-tutorial/src/setupStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ export async function setupStep(
return { editor: undefined, highlightRanges: [] };
}

if (currentTutorial == null) {
throw new Error("No current tutorial found");
}

const { initialState: snapshot, languageId = "plaintext" } =
currentTutorial!.steps[state.stepNumber];
currentTutorial.steps[state.stepNumber];

if (snapshot == null) {
return { editor, highlightRanges: [] };
Expand Down
Loading
Loading