34 lines
912 B
JavaScript
34 lines
912 B
JavaScript
import tsParser from "@typescript-eslint/parser";
|
|
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/**/*.ts"],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tsPlugin,
|
|
},
|
|
rules: {
|
|
// Error-level: catch real bugs
|
|
"@typescript-eslint/no-misused-promises": "error",
|
|
"@typescript-eslint/no-floating-promises": "error",
|
|
"no-console": "off", // CLI tool — console is the UI
|
|
|
|
// Warn-level: style preferences
|
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
|
|
// Off: too noisy for this codebase
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
},
|
|
},
|
|
{
|
|
ignores: ["dist/", "node_modules/", "tests/"],
|
|
},
|
|
];
|