chore: add ESLint with TypeScript support and baseline config
Install eslint, @eslint/js, and typescript-eslint as dev dependencies. Add eslint.config.js (flat config) with rules tuned to zero errors on the current codebase, add ESLint local hook to .pre-commit-config.yaml, and update the lint:ts npm script to use ESLint directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
19
eslint.config.js
Normal file
19
eslint.config.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import eslint from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
files: ["src/**/*.ts"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
||||
"@typescript-eslint/no-unsafe-function-type": "off",
|
||||
"preserve-caught-error": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ["dist/", "node_modules/", "**/*.js", "!eslint.config.js"],
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user