Skip to content

Commit 0ef5f5c

Browse files
committed
update dependencies
1 parent 820259c commit 0ef5f5c

7 files changed

Lines changed: 2995 additions & 5243 deletions

File tree

.github/workflows/lint-deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- name: checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@v6
2121
with:
2222
node-version-file: '.nvmrc'
2323

@@ -39,10 +39,10 @@ jobs:
3939

4040
steps:
4141
- name: checkout
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v6
4343

4444
- name: Setup Node.js
45-
uses: actions/setup-node@v4
45+
uses: actions/setup-node@v6
4646
with:
4747
node-version-file: '.nvmrc'
4848

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

eslint.config.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
import { fileURLToPath } from 'node:url';
22
import { includeIgnoreFile } from '@eslint/compat';
33
import js from '@eslint/js';
4+
import { defineConfig } from 'eslint/config';
45
import prettier from 'eslint-config-prettier';
5-
import eslintPluginImport from 'eslint-plugin-import';
6+
import { importX } from 'eslint-plugin-import-x';
67
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
78
import svelte from 'eslint-plugin-svelte';
89
import globals from 'globals';
9-
import ts from 'typescript-eslint';
10-
import svelteConfig from './svelte.config.js';
10+
import { configs as tsConfigs, parser as tsParser } from 'typescript-eslint';
1111

1212
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
1313

14-
export default ts.config(
14+
export default defineConfig(
1515
includeIgnoreFile(gitignorePath),
1616
js.configs.recommended,
17-
...ts.configs.recommended,
17+
...tsConfigs.recommended,
1818
// import plugin
19-
eslintPluginImport.flatConfigs.recommended,
20-
eslintPluginImport.flatConfigs.typescript,
19+
importX.flatConfigs.recommended,
20+
importX.flatConfigs.typescript,
2121
...svelte.configs.recommended,
2222
prettier,
2323
...svelte.configs.prettier,
2424
eslintPluginPrettierRecommended, // prettier plugin must be placed at the bottom
2525
{
2626
languageOptions: {
27-
globals: { ...globals.browser, ...globals.node },
27+
globals: {
28+
...globals.browser,
29+
...globals.node,
30+
},
2831
},
2932
rules: {
30-
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
31-
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
32-
'no-undef': 'off',
33-
'import/no-unresolved': 'off', // TODO check why the svelte aliases (eg. $app/xy) don't work with the import plugin
34-
'import/order': [
33+
'import-x/no-unresolved': 'off', // TODO check why the svelte aliases (eg. $app/xy) don't work with the import plugin
34+
// Disable import-x/no-duplicate because of issues with imports from svelte/xy (eg. svelte/animate). TODO Reenable once https://github.com/import-js/eslint-plugin-import/issues/1479 is fixed.
35+
'import-x/no-duplicates': 'off',
36+
'no-duplicate-imports': 'error',
37+
'import-x/order': [
3538
'error',
3639
{
3740
alphabetize: {
@@ -42,37 +45,37 @@ export default ts.config(
4245
groups: [
4346
'builtin',
4447
'external',
48+
'type',
4549
'internal',
4650
'parent',
4751
'sibling',
4852
'index',
4953
'object',
50-
'type',
5154
],
5255
'newlines-between': 'never',
5356
},
5457
],
55-
// Enable checking of the inline order of imports (everything in { ... }) but disables the order of the import statements, since this is done with the 'import/order' rule
58+
// Enable checking of the inline order of imports (everything in { ... }) but disables the order of the import statements, since this is done with the 'import-x/order' rule
5659
'sort-imports': [
5760
'error',
5861
{
5962
ignoreDeclarationSort: true,
63+
ignoreCase: true,
6064
},
6165
],
6266
},
6367
},
6468
{
65-
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
69+
files: ['**/*.svelte'],
70+
6671
languageOptions: {
6772
parserOptions: {
68-
projectService: true,
69-
extraFileExtensions: ['.svelte'],
70-
parser: ts.parser,
71-
svelteConfig,
73+
parser: tsParser,
7274
},
7375
},
7476
rules: {
7577
'svelte/no-at-html-tags': 'off',
78+
'svelte/no-navigation-without-resolve': 'warn',
7679
},
7780
},
7881
);

0 commit comments

Comments
 (0)