Skip to content

Commit 13eb834

Browse files
authored
Merge pull request rust-lang#19194 from BenjaminBrienen/node
Update Node.js and vscode
2 parents 239a686 + d6f5377 commit 13eb834

29 files changed

+2616
-1758
lines changed

src/tools/rust-analyzer/.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
- name: Install Nodejs
175175
uses: actions/setup-node@v4
176176
with:
177-
node-version: 18
177+
node-version: 22
178178
if: needs.changes.outputs.typescript == 'true'
179179

180180
- name: Install xvfb

src/tools/rust-analyzer/.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install Node.js toolchain
7070
uses: actions/setup-node@v4
7171
with:
72-
node-version: 20
72+
node-version: 22
7373

7474
- name: Install Rust toolchain
7575
run: |
@@ -188,7 +188,7 @@ jobs:
188188
- name: Install Nodejs
189189
uses: actions/setup-node@v4
190190
with:
191-
node-version: 20
191+
node-version: 22
192192

193193
- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
194194
if: github.ref == 'refs/heads/release'

src/tools/rust-analyzer/editors/code/.eslintignore

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

src/tools/rust-analyzer/editors/code/.eslintrc.js

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

src/tools/rust-analyzer/editors/code/.prettierrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import eslintConfigPrettier from "eslint-config-prettier";
2+
import stylistic from "@stylistic/eslint-plugin";
3+
import eslint from "@eslint/js";
4+
import tseslint from "typescript-eslint";
5+
import stylisticJs from "@stylistic/eslint-plugin-js";
6+
import { type FlatESLintConfig } from "eslint-define-config";
7+
8+
const config: FlatESLintConfig[] = [
9+
eslintConfigPrettier,
10+
eslint.configs.recommended,
11+
stylisticJs.configs["disable-legacy"],
12+
...tseslint.configs.recommended,
13+
stylistic.configs.customize({
14+
indent: 4,
15+
quotes: "double",
16+
semi: true,
17+
braceStyle: "1tbs",
18+
arrowParens: true,
19+
}),
20+
{
21+
rules: {
22+
"no-console": "warn",
23+
"@typescript-eslint/no-unused-vars": [
24+
"error",
25+
{
26+
args: "all",
27+
argsIgnorePattern: "^_",
28+
caughtErrors: "all",
29+
caughtErrorsIgnorePattern: "^_",
30+
destructuredArrayIgnorePattern: "^_",
31+
varsIgnorePattern: "^_",
32+
ignoreRestSiblings: true,
33+
},
34+
],
35+
// the following stylistic lints conflict with prettier
36+
"@stylistic/operator-linebreak": "off",
37+
"@stylistic/indent-binary-ops": "off",
38+
"@stylistic/indent": "off",
39+
"@stylistic/brace-style": "off",
40+
"@stylistic/quotes": "off",
41+
},
42+
},
43+
{
44+
ignores: ["out/", ".vscode-test/", "node_modules/"],
45+
},
46+
];
47+
48+
export default config;

0 commit comments

Comments
 (0)