work-hub-server/packages/tooling/eslint/nestjs.mjs
Nicolas HOARAU f11c306ac6
All checks were successful
ci / ci (22) (push) Successful in 11m57s
feat: add type checking and linting improvements across the project
- Added "check-types" script to package.json for type checking in both api and web apps.
- Updated ESLint configuration to use a shared tooling package for consistent linting rules.
- Refactored TypeScript configurations to extend from shared tooling configurations.
- Improved code formatting and consistency in various files, including Vue components and TypeScript files.
- Introduced CI workflow for automated linting, formatting checks, and type checking on push and pull request events.
- Cleaned up unnecessary dependencies and updated existing ones for better performance and maintainability.
2026-06-04 16:33:06 +04:00

43 lines
1.1 KiB
JavaScript

// @ts-check
import { base as baseConfig } from "./base.mjs";
import { defineConfig } from "eslint/config";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import globals from "globals";
export { globals };
/**
* @param {string} tsconfigRootDir
* @param {Record<string, import("eslint").Linter.RuleEntry>} [overrides]
* @returns {ReturnType<import("eslint/config").defineConfig>}
*/
export function createNestjsConfig(tsconfigRootDir, overrides = {}) {
return defineConfig(
{ ignores: ["eslint.config.mjs"] },
...baseConfig,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
sourceType: "commonjs",
parserOptions: {
projectService: true,
tsconfigRootDir,
},
},
},
{
rules: {
"class-methods-use-this": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"prettier/prettier": ["error", { endOfLine: "auto" }],
...overrides,
},
},
);
}