summarum/eslint.config.js
qwen.ai[bot] d8437eddbe feat: add ESLint + Prettier configuration and fix 123 linting errors
- Add ESLint v9+ with TypeScript parser and rules
- Add Prettier for code formatting
- Add npm scripts: lint, lint:fix, format, format:check
- Fix all auto-fixable linting errors (123 errors, 7 warnings)
- Improve type safety in editor.ts, storage.ts and test files
- Add curly braces to all control statements
- Fix unbound method warnings in tests
2026-08-12 13:36:01 +00:00

31 lines
920 B
JavaScript

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintConfigPrettier,
{
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": "error",
"no-console": "off",
curly: ["error", "all"],
eqeqeq: ["error", "always"],
"prefer-const": "warn",
},
},
{
ignores: ["dist/", "node_modules/", "*.d.ts"],
}
);