Skip to content

Oh god, finally. No error Linit #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"node": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"ignorePatterns": ["**/dist/*", "**/coverage/*", "node_modules"]
}
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ jobs:
- name: Run formatting check
run: npm run format:check

- name: Lint check
run: npm run lint

- name: Check linting
run: npm run lint -- --max-warnings=0
5 changes: 3 additions & 2 deletions .github/workflows/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import pluginSecurity from "eslint-plugin-security";

/** @type {import('eslint').Linter.Config} */
export default {
Expand All @@ -10,8 +11,8 @@ export default {
},
extends: [
pluginJs.configs.recommended,
tseslint.configs.recommended, // Ensure @typescript-eslint is installed
and configured
...tseslint.configs.recommended,
pluginSecurity.configs.recommended,
],
};

Empty file added eslint
Empty file.
29 changes: 29 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import js from "@eslint/js";
import ts from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import globals from "globals";

/** @type {import("eslint").Linter.FlatConfig[]} */
export default [
// ✅ JavaScript Recommended Rules
js.configs.recommended,

// ✅ TypeScript Rules (Flat Config)
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
...globals.node, // 👈 Fix: Adds `process` and other Node.js globals
},
},
plugins: {
"@typescript-eslint": ts,
},
rules: {
...(ts.configs.recommended.rules ?? {}),
},
},
];

Empty file.
34 changes: 18 additions & 16 deletions package-lock.json

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

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
"dev": "npx tsc && node dist/main.js"
},
"devDependencies": {
"@eslint/js": "^9.18.0",
"@eslint/js": "^9.19.0",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/node": "^22.9.0",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"@vitest/coverage-v8": "^2.1.8",
"drizzle-kit": "^0.28.1",
"eslint": "^9.18.0",
"eslint": "^9.19.0",
"globals": "^15.14.0",
"prettier": "3.4.2",
"tsx": "^4.19.2",
Expand Down
8 changes: 8 additions & 0 deletions src/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
]
}
Loading