diff --git a/bun.lockb b/bun.lockb index 100e759..d614143 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..4398c20 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,43 @@ +import js from "@eslint/js"; +import ts from 'typescript-eslint'; +import tsEslintParser from "@typescript-eslint/parser"; +import tsEslint from "@typescript-eslint/eslint-plugin"; +import globals from "globals"; + +export default ts.config( + js.configs.recommended, + ...ts.configs.recommended, + { + languageOptions: { + parser: tsEslintParser, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020 + }, + globals: { + ...globals.browser, + ...globals.es2021, + ...globals.node, + }, + }, + plugins: { + tseslint: tsEslint, + }, + ignores: [ + ".DS_Store", + "node_modules", + "/dist", + "/cmd", + "/utils", + "/package", + "/build", + ".env", + ".env.*", + "!.env.example", + "pnpm-lock.yaml", + "package-lock.json", + "yarn.lock", + "bun.lockb", + ], + } +); \ No newline at end of file diff --git a/package.json b/package.json index 8d67554..8d1514f 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,20 @@ "name": "shadow", "type": "module", "scripts": { - "dev": "bun run vite build --watch" + "dev": "bun run vite build --watch", + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "@types/bun": "latest", + "@types/eslint": "^8.56.10", + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", "autoprefixer": "^10.4.19", "daisyui": "^4.10.2", + "eslint": "^9.1.1", "glob": "^10.3.12", + "globals": "^15.0.0", "postcss": "^8.4.38", "tailwindcss": "^3.4.3", "ts-node": "^10.9.2", @@ -18,7 +25,9 @@ "typescript": "^5.0.0" }, "dependencies": { + "@eslint/js": "^9.1.1", "sharp": "^0.33.3", + "typescript-eslint": "^7.7.1", "vite-plugin-image-optimizer": "^1.1.7", "vitest": "^1.5.0" }