Skip to content

Commit 7aeedf4

Browse files
rmunnhahn-kev
andauthored
Update NPM dependencies for Svelte, eslint, and eslint plugins (#1842)
* Update NPM dependencies This updates Svelte to the latest (5.36) without encountering the Storybook errors we had been running into earlier. The eslint plugin errors do not yet go away, since that fix is apparently in version 3 of eslint-plugin-svelte and we're currently on version 2. Next commit will try the major version upgrade. * Update eslint-plugin-svelte to v3 Also requires updating eslint.config.js to eslint's new config format, which means we can get rid of the @eslint/eslintrc requirement. Many new lint errors in this commit, due to new lint rules that we don't have ignored yet. * Temporarily ignore new lint errors Will fix them in a new PR * Remove old eslint plugins * Use bits-ui version with onCloseAutoFocus bugfix * remove unused package from pnpm workspace, add autoprefixer * Update pnpm-lock.yaml * avoid svelte error thinking a field had been defined twice --------- Co-authored-by: Kevin Hahn <kevin_hahn@sil.org>
1 parent 140680e commit 7aeedf4

7 files changed

Lines changed: 1369 additions & 1574 deletions

File tree

frontend/eslint.config.js

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
import {FlatCompat} from '@eslint/eslintrc';
21
import {fileURLToPath} from 'url';
32
import globals from 'globals';
43
import js from '@eslint/js';
54
import path from 'path';
65
import svelteParser from 'svelte-eslint-parser';
76
import tsParser from '@typescript-eslint/parser';
87
import svelteConfig from './svelte.config.js';
8+
import typescript from 'typescript-eslint';
9+
import stylistic from '@stylistic/eslint-plugin';
10+
import svelte from 'eslint-plugin-svelte';
911

1012
// mimic CommonJS variables
1113
const __filename = fileURLToPath(import.meta.url);
1214
const __dirname = path.dirname(__filename);
13-
const compat = new FlatCompat({
14-
baseDirectory: __dirname
15-
});
1615

1716
export default [
1817
{
@@ -27,28 +26,26 @@ export default [
2726
],
2827
},
2928
js.configs.recommended,
30-
// TypeScript and Svelte plugins don't seem to support the new config format yet
31-
// So, using backwards compatibility util: https://eslint.org/blog/2022/08/new-config-system-part-2/#backwards-compatibility-utility
32-
...compat.config({
33-
plugins: ['@typescript-eslint', '@stylistic'],
34-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking'],
35-
overrides: [
36-
{
37-
files: ['*.svelte'],
38-
rules: {
39-
// The Svelte plugin doesn't seem to have typing quite figured out
40-
'@typescript-eslint/no-unsafe-assignment': 'off',
41-
'@typescript-eslint/no-unsafe-member-access': 'off',
42-
'@typescript-eslint/no-unsafe-call': 'off',
43-
'@typescript-eslint/no-unsafe-return': 'off',
44-
'@typescript-eslint/no-unsafe-argument': 'off',
45-
},
46-
}
47-
]
48-
}),
49-
...compat.config({
50-
extends: ['plugin:svelte/recommended'],
51-
}),
29+
{
30+
plugins: {
31+
// '@typescript-eslint': typescript, // Included in ...typescript.configs.recommended
32+
'@stylistic': stylistic,
33+
},
34+
},
35+
...typescript.configs.recommended,
36+
...typescript.configs.recommendedTypeChecked,
37+
{
38+
files: ['**/*.svelte'],
39+
rules: {
40+
// The Svelte plugin doesn't seem to have typing quite figured out
41+
'@typescript-eslint/no-unsafe-assignment': 'off',
42+
'@typescript-eslint/no-unsafe-member-access': 'off',
43+
'@typescript-eslint/no-unsafe-call': 'off',
44+
'@typescript-eslint/no-unsafe-return': 'off',
45+
'@typescript-eslint/no-unsafe-argument': 'off',
46+
},
47+
},
48+
...svelte.configs.recommended,
5249
{
5350
rules: {
5451
// https://typescript-eslint.io/rules/
@@ -146,4 +143,12 @@ export default [
146143
}
147144
},
148145
},
146+
{
147+
// TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
148+
files: ['**/*.svelte', '**/*.svelte.ts'],
149+
rules: {
150+
'svelte/require-each-key': 'off',
151+
'svelte/no-useless-mustaches': 'off',
152+
},
153+
},
149154
];

frontend/package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,28 @@
3131
"devDependencies": {
3232
"@dotenvx/dotenvx": "^0.37.1",
3333
"@egoist/tailwindcss-icons": "^1.9.0",
34-
"@eslint/eslintrc": "^3.3.1",
35-
"@eslint/js": "^9.29.0",
36-
"@graphql-codegen/cli": "^5.0.5",
37-
"@graphql-codegen/client-preset": "^4.8.0",
34+
"@eslint/js": "^9.31.0",
35+
"@graphql-codegen/cli": "^5.0.7",
36+
"@graphql-codegen/client-preset": "^4.8.3",
3837
"@graphql-codegen/schema-ast": "^4.1.0",
3938
"@graphql-codegen/typescript": "^4.1.6",
4039
"@graphql-typed-document-node/core": "^3.2.0",
4140
"@iconify-json/mdi": "^1.2.3",
4241
"@playwright/test": "catalog:",
4342
"@stylistic/eslint-plugin": "catalog:",
44-
"@sveltejs/adapter-node": "^5.2.12",
43+
"@sveltejs/adapter-node": "^5.2.13",
4544
"@sveltejs/kit": "2.20.7",
4645
"@sveltejs/vite-plugin-svelte": "catalog:",
4746
"@tailwindcss/typography": "^0.5.16",
4847
"@types/mjml": "^4.7.4",
49-
"@types/node": "^20.17.32",
48+
"@types/node": "^20.19.9",
5049
"@types/zxcvbn": "^4.4.5",
51-
"@typescript-eslint/eslint-plugin": "catalog:",
5250
"@typescript-eslint/parser": "catalog:",
53-
"@urql/core": "^5.1.1",
51+
"@urql/core": "^5.2.0",
5452
"@urql/devtools": "^2.0.3",
55-
"@urql/exchange-graphcache": "^7.2.3",
53+
"@urql/exchange-graphcache": "^7.2.4",
5654
"@urql/svelte": "^4.2.3",
57-
"autoprefixer": "^10.4.21",
55+
"autoprefixer": "catalog:",
5856
"daisyui": "^4.12.24",
5957
"eslint": "catalog:",
6058
"eslint-plugin-svelte": "catalog:",
@@ -72,17 +70,18 @@
7270
"sveltekit-superforms": "^1.13.4",
7371
"tailwindcss": "catalog:",
7472
"tslib": "catalog:",
75-
"type-fest": "^4.40.1",
73+
"type-fest": "^4.41.0",
7674
"typescript": "catalog:",
75+
"typescript-eslint": "catalog:",
7776
"vite": "catalog:",
78-
"vite-plugin-graphql-codegen": "^3.5.0",
77+
"vite-plugin-graphql-codegen": "^3.6.3",
7978
"vitest": "catalog:",
80-
"zod": "^3.24.3",
79+
"zod": "^3.25.76",
8180
"zxcvbn": "^4.4.2"
8281
},
8382
"type": "module",
8483
"dependencies": {
85-
"@floating-ui/dom": "^1.6.13",
84+
"@floating-ui/dom": "^1.7.2",
8685
"@opentelemetry/api": "^1.9.0",
8786
"@opentelemetry/auto-instrumentations-node": "^0.47.1",
8887
"@opentelemetry/auto-instrumentations-web": "^0.40.0",
@@ -92,7 +91,7 @@
9291
"@opentelemetry/resources": "^1.30.1",
9392
"@opentelemetry/sdk-node": "^0.51.1",
9493
"@opentelemetry/sdk-trace-web": "^1.30.1",
95-
"@opentelemetry/semantic-conventions": "^1.32.0",
94+
"@opentelemetry/semantic-conventions": "^1.36.0",
9695
"@tailwindcss/container-queries": "^0.1.1",
9796
"@types/js-cookie": "^3.0.6",
9897
"@types/set-cookie-parser": "^2.4.10",
@@ -107,7 +106,7 @@
107106
"set-cookie-parser": "^2.7.1",
108107
"svelte-exmarkdown": "catalog:",
109108
"svelte-intl-precompile": "^0.12.3",
110-
"sveltekit-search-params": "^3",
109+
"sveltekit-search-params": "^3.0.0",
111110
"tus-js-client": "^4.3.1"
112111
},
113112
"pnpm": {

0 commit comments

Comments
 (0)