Skip to content

Commit

Permalink
chore: migrate to eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
DW225 committed Jan 16, 2025
1 parent d346d25 commit 1e6ae49
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import drizzle from "eslint-plugin-drizzle";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends(
"next/core-web-vitals",
"prettier",
"plugin:drizzle/all",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
drizzle,
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
},
},

rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
},
}];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"zod": "^3.24.1"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@fluid-tailwind/tailwind-merge": "^0.0.3",
"@next/bundle-analyzer": "15.1.2",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e6ae49

Please sign in to comment.