Skip to content

Commit

Permalink
upgrade eslint (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmintey authored Aug 24, 2024
1 parent 2bd99d8 commit 1a8a9af
Show file tree
Hide file tree
Showing 19 changed files with 266 additions and 237 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

42 changes: 0 additions & 42 deletions .eslintrc.cjs

This file was deleted.

76 changes: 76 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import tseslint from "typescript-eslint";
import eslintPluginSvelte from "eslint-plugin-svelte";
import globals from "globals";
import svelteParser from "svelte-eslint-parser";
import eslint from "@eslint/js";
import svelteConfig from "./svelte.config.js";

export default tseslint.config(
{
ignores: [
"**/.DS_Store",
"**/node_modules",
"build",
".svelte-kit",
"package",
"**/.env",
"**/.env.*",
"!**/.env.example",
"**/pnpm-lock.yaml",
"**/package-lock.json",
"**/yarn.lock"
]
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginSvelte.configs["flat/prettier"],
{
plugins: {
"@typescript-eslint": tseslint.plugin
},

languageOptions: {
globals: {
...globals.browser,
...globals.node
},

parser: tseslint.parser,
ecmaVersion: 2020,
sourceType: "module"
},

rules: {
"svelte/sort-attributes": "warn",

"svelte/shorthand-directive": [
"warn",
{
prefer: "always"
}
]
}
},
{
files: ["**/*.svelte"],

languageOptions: {
parser: svelteParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
parser: tseslint.parser,
svelteConfig
}
}
},
{
files: ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx", "**/*.svelte"],

rules: {
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
);
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,24 @@
"seed": "node prisma/seed.js"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@floating-ui/dom": "^1.6.7",
"@skeletonlabs/skeleton": "^2.10.2",
"@skeletonlabs/tw-plugin": "^0.4.0",
"@sveltejs/adapter-node": "^5.2.0",
"@sveltejs/kit": "^2.5.18",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@tailwindcss/forms": "^0.5.7",
"@types/eslint": "^8.56.10",
"@types/eslint": "^9.6.0",
"@types/metascraper": "^5.14.3",
"@types/node": "^20.14.11",
"@types/nodemailer": "^6.4.15",
"@types/pulltorefreshjs": "^0.1.7",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@vite-pwa/sveltekit": "^0.6.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"fuzzysort": "^3.0.2",
"globals": "^15.9.0",
"postcss": "^8.4.39",
"postcss-load-config": "^5.1.0",
"prettier": "^3.3.3",
Expand All @@ -49,6 +47,7 @@
"ts-node": "^10.9.2",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"typescript-eslint": "^8.2.0",
"vite": "^5.3.4",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-tailwind-purgecss": "^0.3.3"
Expand Down
Loading

0 comments on commit 1a8a9af

Please sign in to comment.