Skip to content

Commit 9df7a45

Browse files
committed
feat: add eslint rules
1 parent 05f38d4 commit 9df7a45

File tree

6 files changed

+2249
-519
lines changed

6 files changed

+2249
-519
lines changed

eslint.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import js from "@eslint/js";
4+
import tseslint from "typescript-eslint";
5+
6+
7+
export default defineConfig([
8+
{ files: ["**/*.{js,mjs,cjs,ts}"] },
9+
{ files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: globals.node } },
10+
{ files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] },
11+
tseslint.configs.recommended,
12+
]);

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
99
"build": "tsc",
10-
"start": "node build/index.js"
10+
"start": "node build/index.js",
11+
"lint": "eslint . --fix"
1112
},
1213
"files": [
1314
"build"
@@ -24,8 +25,12 @@
2425
"zod": "^3.24.2"
2526
},
2627
"devDependencies": {
28+
"@eslint/js": "^9.23.0",
2729
"@types/js-yaml": "^4.0.9",
2830
"@types/node": "^22.13.10",
29-
"typescript": "^5.8.2"
31+
"eslint": "^9.23.0",
32+
"globals": "^16.0.0",
33+
"typescript": "^5.8.2",
34+
"typescript-eslint": "^8.28.0"
3035
}
3136
}

0 commit comments

Comments
 (0)