Skip to content

Commit f23d3ee

Browse files
authored
Update to monaco-vscode-api 23.2.2 and introduce oxlint (#999)
* Update dependencies * Migrate from eslint to oxlint where possible * Update version / prepare new release
1 parent 067681a commit f23d3ee

File tree

31 files changed

+2493
-1815
lines changed

31 files changed

+2493
-1815
lines changed

.oxlintrc.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"typescript"
5+
],
6+
"categories": {
7+
"correctness": "error"
8+
},
9+
"env": {
10+
"builtin": true,
11+
"es2022": true,
12+
"browser": true,
13+
"node": true
14+
},
15+
"ignorePatterns": [
16+
"**/.chrome/**/*",
17+
"**/node_modules/**/*",
18+
"**/dist/**/*",
19+
"**/lib/**/*",
20+
"**/out/**/*",
21+
"**/bin/**/*",
22+
"**/resources/**/*",
23+
"**/production/**/*",
24+
"**/public/**/*",
25+
"**/.next/**/*",
26+
"**/*env.d.ts",
27+
"**/.pnp.cjs"
28+
],
29+
"rules": {
30+
"eqeqeq": "error",
31+
// currently in oxlint's nursery (=under development)
32+
"constructor-super": "error",
33+
// currently unsupported by oxlint
34+
"dot-notation": "error",
35+
"for-direction": "error",
36+
// currently in oxlint's nursery (=under development)
37+
"getter-return": "error",
38+
"guard-for-in": "error",
39+
// currently unsupported by oxlint
40+
"new-parens": "error",
41+
"no-async-promise-executor": "error",
42+
"no-bitwise": "error",
43+
"no-caller": "error",
44+
"no-case-declarations": "error",
45+
"no-class-assign": "error",
46+
"no-compare-neg-zero": "error",
47+
"no-cond-assign": "error",
48+
"no-const-assign": "error",
49+
"no-constant-binary-expression": "error",
50+
"no-constant-condition": "error",
51+
"no-control-regex": "error",
52+
"no-debugger": "error",
53+
"no-delete-var": "error",
54+
// currently unsupported by oxlint
55+
"no-dupe-args": "error",
56+
"no-dupe-class-members": "error",
57+
"no-dupe-else-if": "error",
58+
"no-dupe-keys": "error",
59+
"no-duplicate-case": "error",
60+
"no-empty": "error",
61+
"no-empty-character-class": "error",
62+
"no-empty-pattern": "error",
63+
"no-empty-static-block": "error",
64+
"no-eval": "error",
65+
"no-ex-assign": "error",
66+
"no-explicit-any": "error",
67+
"no-extra-boolean-cast": "error",
68+
"no-fallthrough": "error",
69+
"no-func-assign": "error",
70+
"no-global-assign": "error",
71+
"no-import-assign": "error",
72+
"no-inner-declarations": "off",
73+
"no-invalid-regexp": "error",
74+
"no-irregular-whitespace": "error",
75+
"no-labels": "error",
76+
"no-loss-of-precision": "error",
77+
// currently in oxlint's nursery (=under development)
78+
"no-misleading-character-class": "error",
79+
// currently unsupported by oxlint
80+
"no-multiple-empty-lines": ["error", {
81+
"max": 1
82+
}],
83+
"no-new-native-nonconstructor": "error",
84+
"no-new-wrappers": "error",
85+
"no-nonoctal-decimal-escape": "error",
86+
"no-obj-calls": "error",
87+
// currently unsupported by oxlint
88+
"no-octal": "error",
89+
"no-prototype-builtins": "error",
90+
"no-redeclare": "error",
91+
"no-regex-spaces": "error",
92+
"no-self-assign": "error",
93+
"no-setter-return": "error",
94+
"no-shadow-restricted-names": "error",
95+
"no-sparse-arrays": "error",
96+
"no-this-before-super": "error",
97+
"no-throw-literal": "error",
98+
// currently unsupported by oxlint
99+
"no-trailing-spaces": "error",
100+
// currently in oxlint's nursery (=under development)
101+
"no-undef": "off",
102+
"no-unexpected-multiline": "error",
103+
// currently in oxlint's nursery (=under development)
104+
"no-unreachable": "error",
105+
"no-unsafe-finally": "error",
106+
"no-unsafe-negation": "error",
107+
"no-unsafe-optional-chaining": "error",
108+
"no-unused-labels": "error",
109+
"no-unused-private-class-members": "error",
110+
"no-unused-vars": [
111+
"error",
112+
{
113+
"caughtErrorsIgnorePattern": "^_",
114+
"argsIgnorePattern": "^_",
115+
"varsIgnorePattern": "^_"
116+
}
117+
],
118+
"no-useless-backreference": "error",
119+
"no-useless-catch": "error",
120+
"no-useless-escape": "error",
121+
"no-var": "error",
122+
"no-var-requires": "error",
123+
"no-with": "error",
124+
// currently unsupported by oxlint
125+
"prefer-const": "error",
126+
"prefer-rest-params": "error",
127+
"prefer-spread": "error",
128+
// currently unsupported by oxlint
129+
"quotes": [2, "single", {
130+
"avoidEscape": true
131+
}],
132+
"require-yield": "error",
133+
// currently unsupported by oxlint
134+
"semi": [2, "always"],
135+
// currently unsupported by oxlint
136+
"space-before-function-paren": ["error", {
137+
"anonymous": "never",
138+
"asyncArrow": "always",
139+
"named": "never"
140+
}],
141+
"use-isnan": "error",
142+
"valid-typeof": "error",
143+
"@typescript-eslint/ban-ts-comment": "error",
144+
"no-array-constructor": "error",
145+
"@typescript-eslint/adjacent-overload-signatures": "error",
146+
"@typescript-eslint/array-type": [
147+
"error",
148+
{
149+
"default": "array-simple"
150+
}
151+
],
152+
"@typescript-eslint/no-duplicate-enum-values": "error",
153+
"@typescript-eslint/no-empty-object-type": "error",
154+
"@typescript-eslint/no-extra-non-null-assertion": "error",
155+
"@typescript-eslint/no-misused-new": "error",
156+
"@typescript-eslint/no-namespace": "off",
157+
"@typescript-eslint/no-non-null-assertion": "off",
158+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
159+
"@typescript-eslint/prefer-for-of": "error",
160+
"@typescript-eslint/no-require-imports": "error",
161+
"@typescript-eslint/no-this-alias": "error",
162+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
163+
"@typescript-eslint/no-unsafe-declaration-merging": "error",
164+
"@typescript-eslint/no-unsafe-function-type": "error",
165+
"@typescript-eslint/no-unused-expressions": "error",
166+
"@typescript-eslint/no-unnecessary-condition": "error",
167+
"@typescript-eslint/no-wrapper-object-types": "error",
168+
"@typescript-eslint/parameter-properties": "error",
169+
"@typescript-eslint/prefer-as-const": "error",
170+
"@typescript-eslint/prefer-namespace-keyword": "error",
171+
"@typescript-eslint/strict-boolean-expressions": "error",
172+
"@typescript-eslint/triple-slash-reference": "error",
173+
// jsPlugins: currently unstable
174+
// "header/header": [2, "block", {
175+
// "pattern": "MIT License|DO NOT EDIT MANUALLY!"
176+
// }],
177+
// "@stylistic/indent": "error",
178+
// "@stylistic/type-annotation-spacing": "error"
179+
},
180+
"files": [
181+
"**/src/**/*.ts",
182+
"**/src/**/*.tsx",
183+
"**/test/**/*.ts",
184+
"**/test/**/*.tsx"
185+
],
186+
// jsPlugins: currently unstable
187+
// "jsPlugins": [
188+
// "eslint-plugin-header",
189+
// "@stylistic/eslint-plugin"
190+
// ]
191+
}

docs/guides/troubleshooting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Whenever you use `monaco-editor`/`@codingame/monaco-vscode-editor-api` `vscode`/
1111
If you use pnpm or yarn, you have to add `vscode` / `@codingame/monaco-vscode-api` as direct dependency, otherwise the installation will fail:
1212

1313
```json
14-
"vscode": "npm:@codingame/monaco-vscode-extension-api@^23.1.0"
14+
"vscode": "npm:@codingame/monaco-vscode-extension-api@^23.2.2"
1515
```
1616

1717
### Missing Overrides or Resolutions
@@ -23,7 +23,7 @@ To ensure all Monaco-related packages use a single, compatible version, you must
2323
```json
2424
{
2525
"overrides": {
26-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"
26+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"
2727
}
2828
}
2929
```
@@ -33,7 +33,7 @@ To ensure all Monaco-related packages use a single, compatible version, you must
3333
```json
3434
{
3535
"resolutions": {
36-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"
36+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"
3737
}
3838
}
3939
```
@@ -50,7 +50,7 @@ Additionally, if you see a message in the browser console starting with `Another
5050

5151
### @codingame/monaco-vscode-editor-api / monaco-editor usage
5252

53-
When you use the libraries from this project you are no longer required to proxy `monaco-editor` like `"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"` in you `package.json`. You can directly use it like so:
53+
When you use the libraries from this project you are no longer required to proxy `monaco-editor` like `"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"` in you `package.json`. You can directly use it like so:
5454

5555
```js
5656
import * as monaco from '@codingame/monaco-vscode-editor-api';
@@ -60,7 +60,7 @@ If your dependency stack already contains a reference `monaco-editor` you must e
6060

6161
```json
6262
"overrides": {
63-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"
63+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"
6464
}
6565
```
6666

docs/installation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ If using npm or pnpm, and your dependencies already contain a refernence to `mon
4545
```json
4646
{
4747
"overrides": {
48-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"
48+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"
4949
}
5050
}
5151
```
@@ -57,7 +57,7 @@ In yarn you have to specify `resolutions` instead of `overrides`:
5757
```json
5858
{
5959
"resolutions": {
60-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.1.0"
60+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^23.2.2"
6161
}
6262
}
6363
```
@@ -69,17 +69,17 @@ If using pnpm, you have to add more transitive dependencies that npm or yarn aut
6969
```json
7070
{
7171
"dependencies": {
72-
"@codingame/monaco-vscode-api": "^23.1.0",
73-
"@codingame/monaco-vscode-configuration-service-override": "^23.1.0",
74-
"@codingame/monaco-vscode-editor-api": "^23.1.0",
75-
"@codingame/monaco-vscode-editor-service-override": "^23.1.0",
76-
"@codingame/monaco-vscode-extension-api": "^23.1.0",
77-
"@codingame/monaco-vscode-extensions-service-override": "^23.1.0",
78-
"@codingame/monaco-vscode-languages-service-override": "^23.1.0",
79-
"@codingame/monaco-vscode-localization-service-override": "^23.1.0",
80-
"@codingame/monaco-vscode-log-service-override": "^23.1.0",
81-
"@codingame/monaco-vscode-model-service-override": "^23.1.0",
82-
"vscode": "npm:@codingame/monaco-vscode-extension-api@^23.1.0"
72+
"@codingame/monaco-vscode-api": "^23.2.2",
73+
"@codingame/monaco-vscode-configuration-service-override": "^23.2.2",
74+
"@codingame/monaco-vscode-editor-api": "^23.2.2",
75+
"@codingame/monaco-vscode-editor-service-override": "^23.2.2",
76+
"@codingame/monaco-vscode-extension-api": "^23.2.2",
77+
"@codingame/monaco-vscode-extensions-service-override": "^23.2.2",
78+
"@codingame/monaco-vscode-languages-service-override": "^23.2.2",
79+
"@codingame/monaco-vscode-localization-service-override": "^23.2.2",
80+
"@codingame/monaco-vscode-log-service-override": "^23.2.2",
81+
"@codingame/monaco-vscode-model-service-override": "^23.2.2",
82+
"vscode": "npm:@codingame/monaco-vscode-extension-api@^23.2.2"
8383
}
8484
}
8585
```

docs/oxlint.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Oxlint
2+
3+
## General
4+
5+
Useful links:
6+
7+
- typescript-eslint: <https://github.com/oxc-project/oxc/issues/2180>
8+
- oxlint rules: <https://oxc.rs/docs/guide/usage/linter/rules.html>
9+
10+
## Eslint to Oxlint migration results
11+
12+
Performed on 2025-11-26.
13+
14+
```shell
15+
unsupported rule, but in development: constructor-super
16+
unsupported rule, but in development: getter-return
17+
unsupported rule: no-dupe-args
18+
unsupported rule, but in development: no-misleading-character-class
19+
unsupported rule: no-octal
20+
unsupported rule, but in development: no-undef
21+
unsupported rule, but in development: no-unreachable
22+
unsupported rule: prefer-const
23+
unsupported rule: dot-notation
24+
unsupported rule: new-parens
25+
unsupported rule: no-multiple-empty-lines
26+
unsupported rule: no-trailing-spaces
27+
unsupported rule: space-before-function-paren
28+
unsupported rule: semi
29+
unsupported rule: quotes
30+
unsupported rule: @typescript-eslint/parameter-properties
31+
unsupported rule: @typescript-eslint/no-unnecessary-condition
32+
```
33+
34+
## Changes
35+
36+
- Replaced `@typescript-eslint/no-var-requires` with `no-var-requires`
37+
- Turned of recommended rule `no-undef` after migration
38+
- All rules in nursery (=under development) and unsupported rules are accompanied by a comment in [.oxlintrc.json](../.oxlintrc.json)
39+
- All rules unsupported by oxlint are still contained in [eslint.config.mjs](../eslint.config.mjs) and applied by eslint.
40+
- JsPlugins are instable in oxlint, therefore they are still contained in [eslint.config.mjs](../eslint.config.mjs) and applied by eslint.

docs/versions-and-history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following table describes which version of **monaco-languageclient** and **@
66

77
| monaco-languageclient | vscode-ws-jsonrpc | monaco-editor-wrapper | monaco-editor-react | monaco-vscode-api / editor-api | vscode | monaco-editor | release date | comment |
88
| :---- | :---- | :---- | :--- | :--- | :--- | :--- | :--- | :--- |
9-
| 10.4.0 | 3.5.0 | 7.4.0 | | 23.1.0 | 1.106.2 | 0.54.0 | unreleased | |
9+
| 10.4.0 | 3.5.0 | 7.4.0 | | 23.2.2 | 1.106.2 | 0.55.1 | 2025-11-26 | |
1010
| 10.3.0 | 3.5.0 | 7.3.0 | | 23.0.0 | 1.106.0 | 0.54.0 | 2025-11-16 | |
1111
| 10.2.0 | 3.5.0 | 7.2.0 | | 22.1.0 | 1.105.0 | 0.54.0 | 2025-10-20 | |
1212
| 10.1.0 | 3.5.0 | 7.1.0 | | 21.3.2 | 1.104.2 | 0.53.0 | 2025-09-30 | |

0 commit comments

Comments
 (0)