Skip to content

Commit

Permalink
Upgrade eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
haishanh committed Jun 29, 2024
1 parent 788b8c6 commit 97679ea
Show file tree
Hide file tree
Showing 16 changed files with 307 additions and 316 deletions.
38 changes: 0 additions & 38 deletions .eslintrc.cjs

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser,
},
},
},
{
ignores: ['build/', '.svelte-kit/', 'dist/'],
},
{
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
];
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@browser-logos/chrome": "2.0.0",
"@browser-logos/firefox": "3.0.10",
"@browser-logos/safari": "2.1.0",
"@eslint/js": "9.6.0",
"@fontsource/inter": "5.0.18",
"@hsjs/svelte-icons": "0.0.1-rc.4",
"@sveltejs/adapter-node": "5.2.0",
Expand All @@ -45,17 +46,15 @@
"@types/debug": "4.1.12",
"@types/estree": "1.0.5",
"@types/tar": "6.1.13",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"autoprefixer": "10.4.19",
"domhandler": "5.0.3",
"esbuild": "0.21.5",
"esbuild-register": "3.5.0",
"eslint": "8.57.0",
"eslint": "9.6.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-simple-import-sort": "12.1.0",
"eslint-plugin-svelte": "2.41.0",
"globals": "15.6.0",
"nanoid": "5.0.7",
"postcss": "8.4.38",
"prettier": "3.3.2",
Expand All @@ -70,6 +69,7 @@
"tslib": "2.6.3",
"tsx": "4.16.0",
"typescript": "5.5.2",
"typescript-eslint": "8.0.0-alpha.34",
"undici": "6.19.2",
"uvu": "0.5.6",
"vite": "5.3.2"
Expand Down
Loading

0 comments on commit 97679ea

Please sign in to comment.