mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 02:12:00 +03:00
- 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
31 lines
920 B
JavaScript
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"],
|
|
}
|
|
);
|