Skip to content

Commit 6e7e99c

Browse files
Started replacing eslint with oxlint and prettier with oxfmt.
1 parent 961d0be commit 6e7e99c

14 files changed

Lines changed: 348 additions & 1837 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- name: Lint
3131
run: pnpm --color lint
3232

33+
- name: Type check
34+
run: pnpm --color typecheck
35+
3336
- name: Forbid TODO
3437
run: ./resources/scripts/forbid-todo.sh
3538

.oxfmtrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80
4+
}

.oxlintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["eslint","typescript", "unicorn", "import"],
4+
"ignorePatterns": [
5+
".git/**",
6+
"resources/playground/**",
7+
"packages/*/out/**",
8+
"packages/*/dist/**",
9+
"packages/app-web-docs/.docusaurus/**",
10+
"packages/app-neovim/cursorless.nvim/**",
11+
"packages/app-vscode/src/keyboard/grammar/generated/**",
12+
"packages/lib-engine/src/customCommandGrammar/generated/**",
13+
"packages/lib-engine/src/snippets/vendor/**",
14+
"**/node_modules/**"
15+
],
16+
"rules": {
17+
18+
},
19+
"overrides": [
20+
21+
]
22+
}

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ repos:
5858
5959
- repo: local
6060
hooks:
61-
- id: eslint
62-
name: eslint
61+
- id: oxlint
62+
name: oxlint
6363
files: \.(ts|tsx)$
6464
language: system
65-
entry: pnpm exec eslint
65+
entry: pnpm exec oxlint
6666
args: [--fix]
6767

6868
- repo: local
@@ -71,8 +71,8 @@ repos:
7171
name: prettier
7272
types: [text]
7373
language: system
74-
entry: pnpm exec prettier
75-
args: [--write, --list-different, --ignore-unknown]
74+
entry: pnpm exec oxfmt
75+
args: [--write, --list-different, --no-error-on-unmatched-pattern]
7676

7777
- repo: local
7878
hooks:

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"recommendations": [
55
"AndreasArvidsson.andreas-talon",
66
"charliermarsh.ruff",
7-
"dbaeumer.vscode-eslint",
8-
"esbenp.prettier-vscode",
7+
"oxc.oxc-vscode",
98
"jrieken.vscode-tree-sitter-query",
109
"wenkokke.talonfmt-vscode",
1110
"usernamehw.commands",

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"pojo",
1919
"subword"
2020
],
21-
"editor.defaultFormatter": "esbenp.prettier-vscode",
22-
"eslint.workingDirectories": [{ "pattern": "packages/*/" }],
21+
"editor.defaultFormatter": "oxc.oxc-vscode",
2322
"files.associations": {
2423
".busted": "lua"
2524
},

eslint.config.mts

Lines changed: 0 additions & 168 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
"build": "pnpm -r build",
1313
"clean": "pnpm -r clean",
1414
"typecheck": "pnpm -r typecheck",
15-
"lint:meta": "pnpm run meta-updater --test",
15+
"lint:meta": "pnpm meta-updater --test",
1616
"lint:syncpack": "syncpack lint",
17-
"lint:ts": "eslint packages",
17+
"lint:ts": "oxlint --deny-warnings .",
1818
"lint:style": "stylelint '**/*.{css,scss}' --ignore-path .gitignore",
19-
"lint:fmt": "prettier --check .",
20-
"lint": "pnpm run typecheck && pnpm run lint:meta && pnpm run lint:syncpack && pnpm run lint:ts && pnpm run lint:style",
21-
"fix:meta": "pnpm run meta-updater && pnpm -r exec prettier --write tsconfig.json package.json",
19+
"lint:fmt": "oxfmt --check .",
20+
"lint": "pnpm lint:meta && pnpm lint:syncpack && pnpm lint:ts && pnpm lint:style && pnpm lint:fmt",
21+
"fix:meta": "pnpm meta-updater && pnpm -r exec oxfmt tsconfig.json package.json",
2222
"fix:syncpack": "syncpack fix",
23-
"fix:eslint": "pnpm lint:ts --fix",
23+
"fix:ts": "oxlint --fix .",
2424
"fix:style": "stylelint '**/*.{css,scss}' --ignore-path .gitignore --fix",
25-
"fix:fmt": "prettier --write --list-different .",
25+
"fix:fmt": "oxfmt .",
2626
"init-vscode-sandbox": "pnpm -F @cursorless/app-vscode init-launch-sandbox",
2727
"meta-updater": "env NODE_OPTIONS=--import=tsx meta-updater",
2828
"preinstall": "npx only-allow pnpm",
@@ -34,26 +34,17 @@
3434
"transform-recorded-tests": "pnpm exec ./packages/lib-common/scripts/c-tsx.js ./packages/lib-engine/src/scripts/transformRecordedTests/index.ts"
3535
},
3636
"devDependencies": {
37-
"@eslint/config-helpers": "^0.5.3",
38-
"@eslint/js": "^10.0.1",
3937
"@pnpm/meta-updater": "^2.0.6",
4038
"@types/node": "^24.12.0",
4139
"esbuild": "^0.27.4",
42-
"eslint": "^10.1.0",
43-
"eslint-config-prettier": "^10.1.8",
44-
"eslint-import-resolver-typescript": "^4.4.4",
45-
"eslint-plugin-import": "^2.32.0",
46-
"eslint-plugin-mocha": "^11.2.0",
47-
"eslint-plugin-unicorn": "^63.0.0",
48-
"eslint-plugin-unused-imports": "^4.4.1",
49-
"prettier": "^3.8.1",
40+
"oxfmt": "^0.16.0",
41+
"oxlint": "^1.15.0",
5042
"stylelint": "^17.5.0",
5143
"stylelint-config-standard": "^40.0.0",
5244
"stylelint-config-standard-scss": "^17.0.0",
5345
"syncpack": "^14.2.1",
5446
"tsx": "^4.21.0",
55-
"typescript": "^5.9.3",
56-
"typescript-eslint": "^8.57.1"
47+
"typescript": "^5.9.3"
5748
},
5849
"pnpm": {
5950
"patchedDependencies": {
@@ -66,7 +57,6 @@
6657
},
6758
"peerDependencyRules": {
6859
"allowedVersions": {
69-
"eslint-plugin-import>eslint": "^10.0.0",
7060
"@pnpm/lockfile-file>@pnpm/logger": "^1001.0.1",
7161
"@pnpm/fetch>@pnpm/logger": "^1001.0.1",
7262
"@pnpm/core-loggers>@pnpm/logger": "^1001.0.1"

packages/app-vscode/eslintConfig.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/app-web/eslintConfig.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)