Skip to content

Commit b5ebe78

Browse files
authored
Update all frontend npm dependencies except Svelte and Vite (#3120)
* Upgrade node dependencies except Svelte 5 and its peer deps * Fix lint errors * Fix previous Rust deps upgrade breakage * Fix demo artwork * Allow profiling CI workflow to fail
1 parent be3de51 commit b5ebe78

39 files changed

+2704
-1616
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"streetsidesoftware.code-spell-checker",
2424
// Helpful
2525
"mhutchie.git-graph",
26-
"waderyan.gitblame",
2726
"qezhu.gitlink",
2827
"wmaurer.change-case"
2928
]

.github/workflows/comment-profiling-changes.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Profiling Changes
22

33
on:
4-
pull_request:
4+
pull_request: {}
55

66
env:
77
CARGO_TERM_COLOR: always
88

99
jobs:
1010
profile:
1111
runs-on: ubuntu-latest
12+
continue-on-error: true
1213
steps:
1314
- uses: actions/checkout@v4
1415
with:
@@ -63,7 +64,7 @@ jobs:
6364
run: |
6465
# Compile benchmarks
6566
cargo bench --bench compile_demo_art_iai -- --save-baseline=master
66-
67+
6768
# Runtime benchmarks
6869
cargo bench --bench update_executor_iai -- --save-baseline=master
6970
cargo bench --bench run_once_iai -- --save-baseline=master
@@ -78,25 +79,25 @@ jobs:
7879
run: |
7980
# Compile benchmarks
8081
COMPILE_OUTPUT=$(cargo bench --bench compile_demo_art_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
81-
82+
8283
# Runtime benchmarks
8384
UPDATE_OUTPUT=$(cargo bench --bench update_executor_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
8485
RUN_ONCE_OUTPUT=$(cargo bench --bench run_once_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
8586
RUN_CACHED_OUTPUT=$(cargo bench --bench run_cached_iai -- --baseline=master --output-format=json | jq -sc | sed 's/\\"//g')
86-
87+
8788
# Store outputs
8889
echo "COMPILE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
8990
echo "$COMPILE_OUTPUT" >> $GITHUB_OUTPUT
9091
echo "EOF" >> $GITHUB_OUTPUT
91-
92+
9293
echo "UPDATE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
9394
echo "$UPDATE_OUTPUT" >> $GITHUB_OUTPUT
9495
echo "EOF" >> $GITHUB_OUTPUT
95-
96+
9697
echo "RUN_ONCE_OUTPUT<<EOF" >> $GITHUB_OUTPUT
9798
echo "$RUN_ONCE_OUTPUT" >> $GITHUB_OUTPUT
9899
echo "EOF" >> $GITHUB_OUTPUT
99-
100+
100101
echo "RUN_CACHED_OUTPUT<<EOF" >> $GITHUB_OUTPUT
101102
echo "$RUN_CACHED_OUTPUT" >> $GITHUB_OUTPUT
102103
echo "EOF" >> $GITHUB_OUTPUT
@@ -135,7 +136,7 @@ jobs:
135136
const updateOutput = JSON.parse(`${{ steps.benchmark.outputs.UPDATE_OUTPUT }}`);
136137
const runOnceOutput = JSON.parse(`${{ steps.benchmark.outputs.RUN_ONCE_OUTPUT }}`);
137138
const runCachedOutput = JSON.parse(`${{ steps.benchmark.outputs.RUN_CACHED_OUTPUT }}`);
138-
139+
139140
let significantChanges = false;
140141
let commentBody = "";
141142

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"streetsidesoftware.code-spell-checker",
1414
// Helpful
1515
"mhutchie.git-graph",
16-
"waderyan.gitblame",
1716
"qezhu.gitlink",
1817
"wmaurer.change-case"
1918
]

frontend/.eslintrc.cjs

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

frontend/eslint.config.js

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import js from "@eslint/js";
2+
import { defineConfig, globalIgnores } from "eslint/config";
3+
import * as pluginImport from "eslint-plugin-import";
4+
import pluginPrettier from "eslint-plugin-prettier";
5+
import pluginSvelte from "eslint-plugin-svelte";
6+
import globals from "globals";
7+
import ts from "typescript-eslint";
8+
9+
export default defineConfig([
10+
js.configs.recommended,
11+
ts.configs.recommended,
12+
pluginImport.flatConfigs.recommended,
13+
pluginImport.flatConfigs.typescript,
14+
pluginSvelte.configs["flat/recommended"],
15+
pluginSvelte.configs["flat/prettier"],
16+
globalIgnores([
17+
// Ignore generated directories
18+
"**/node_modules/",
19+
"**/dist/",
20+
"**/pkg/",
21+
"wasm/pkg/",
22+
// Don't ignore JS and TS dotfiles in this folder
23+
"!**/.*.js",
24+
"!**/.*.ts",
25+
]),
26+
{
27+
plugins: {
28+
prettier: pluginPrettier,
29+
},
30+
settings: {
31+
"import/parsers": { "@typescript-eslint/parser": [".ts"] },
32+
"import/resolver": { typescript: true, node: true },
33+
},
34+
languageOptions: {
35+
parserOptions: {
36+
project: "./tsconfig.json",
37+
},
38+
globals: {
39+
...globals.browser,
40+
...globals.node,
41+
},
42+
},
43+
rules: {
44+
// Standard ESLint config (for ordinary JS syntax linting)
45+
indent: "off",
46+
quotes: ["error", "double", { allowTemplateLiterals: true }],
47+
camelcase: ["error", { properties: "always" }],
48+
"linebreak-style": ["error", "unix"],
49+
"eol-last": ["error", "always"],
50+
"max-len": ["error", { code: 200, tabWidth: 4, ignorePattern: `d="([\\s\\S]*?)"` }],
51+
"prefer-destructuring": "off",
52+
"no-console": "warn",
53+
"no-debugger": "warn",
54+
"no-param-reassign": ["error", { props: false }],
55+
"no-bitwise": "off",
56+
"no-shadow": "off",
57+
"no-use-before-define": "off",
58+
"no-restricted-imports": ["error", { patterns: [".*", "!@graphite/*"] }],
59+
60+
// TypeScript plugin config (for TS-specific linting)
61+
"@typescript-eslint/indent": "off",
62+
"@typescript-eslint/camelcase": "off",
63+
"@typescript-eslint/no-use-before-define": "off",
64+
"@typescript-eslint/no-unused-vars": [
65+
"error",
66+
{
67+
args: "all",
68+
argsIgnorePattern: "^_",
69+
caughtErrors: "all",
70+
caughtErrorsIgnorePattern: "^_",
71+
destructuredArrayIgnorePattern: "^_",
72+
varsIgnorePattern: "^_",
73+
ignoreRestSiblings: true,
74+
},
75+
],
76+
"@typescript-eslint/consistent-type-imports": "error",
77+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
78+
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as", objectLiteralTypeAssertions: "never" }],
79+
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
80+
"@typescript-eslint/consistent-generic-constructors": ["error", "constructor"],
81+
"@typescript-eslint/no-restricted-types": ["error", { types: { null: "Use `undefined` instead." } }],
82+
83+
// Prettier plugin config (for validating and fixing formatting)
84+
"prettier/prettier": "error",
85+
86+
// Svelte plugin config (for validating Svelte-specific syntax)
87+
"svelte/no-at-html-tags": "off",
88+
"svelte/no-useless-mustaches": "off",
89+
"svelte/valid-compile": ["error", { ignoreWarnings: true }],
90+
"svelte/require-each-key": "off", // TODO: Remove this rule and fix the places where it's violated
91+
92+
// Import plugin config (for intelligently validating module import statements)
93+
"import/no-unresolved": "error",
94+
// `no-duplicates` disabled due to <https://github.com/import-js/eslint-plugin-import/issues/1479#issuecomment-1789527447>. Reenable if that issue gets fixed.
95+
"import/no-duplicates": "off",
96+
"import/prefer-default-export": "off",
97+
"import/no-relative-packages": "error",
98+
"import/no-named-as-default-member": "off",
99+
"import/order": [
100+
"error",
101+
{
102+
alphabetize: { order: "asc", caseInsensitive: true },
103+
pathGroups: [{ pattern: "**/*.svelte", group: "unknown", position: "after" }],
104+
"newlines-between": "always-and-inside-groups",
105+
warnOnUnassignedImports: true,
106+
},
107+
],
108+
},
109+
},
110+
{
111+
files: ["**/*.svelte"],
112+
languageOptions: {
113+
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
114+
parserOptions: {
115+
projectService: true,
116+
parser: ts.parser,
117+
extraFileExtensions: [".svelte"],
118+
},
119+
},
120+
},
121+
{
122+
files: ["**/*.js"],
123+
extends: [ts.configs.disableTypeChecked],
124+
},
125+
]);

0 commit comments

Comments
 (0)