diff --git a/sample/11-swagger/.eslintrc.js b/sample/11-swagger/.eslintrc.js deleted file mode 100644 index 284719548..000000000 --- a/sample/11-swagger/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - }, - plugins: ['@typescript-eslint/eslint-plugin'], - extends: [ - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - ], - root: true, - env: { - node: true, - jest: true, - }, - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', - }, -}; diff --git a/sample/11-swagger/eslint.config.mjs b/sample/11-swagger/eslint.config.mjs new file mode 100644 index 000000000..ba1c71128 --- /dev/null +++ b/sample/11-swagger/eslint.config.mjs @@ -0,0 +1,42 @@ +// @ts-check +import eslint from '@eslint/js'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import globals from 'globals'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + { + ignores: ['eslint.config.mjs'], + }, + eslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + eslintPluginPrettierRecommended, + { + languageOptions: { + globals: { + ...globals.node, + ...globals.jest, + }, + ecmaVersion: 5, + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-unsafe-argument': 'warn', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-assignment': 'warn', + '@typescript-eslint/no-unsafe-call': 'warn', + '@typescript-eslint/no-unsafe-member-access': 'warn', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/no-unused-vars': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/11-swagger/package.json b/sample/11-swagger/package.json index d5c31c412..6695bf35b 100644 --- a/sample/11-swagger/package.json +++ b/sample/11-swagger/package.json @@ -19,10 +19,10 @@ "test:e2e": "echo 'No e2e tests implemented yet.'" }, "dependencies": { - "@nestjs/common": "10.4.15", - "@nestjs/core": "10.4.15", - "@nestjs/platform-express": "10.4.15", - "@nestjs/swagger": "8.1.1", + "@nestjs/common": "11.0.0", + "@nestjs/core": "^11.0.0", + "@nestjs/platform-express": "11.0.0", + "@nestjs/swagger": "^11.0.0-next.1", "class-transformer": "0.5.1", "class-validator": "0.14.1", "reflect-metadata": "0.2.2", @@ -34,9 +34,9 @@ "@eslint/js": "9.18.0", "@nestjs/cli": "10.4.9", "@nestjs/schematics": "10.2.3", - "@nestjs/testing": "10.4.15", - "@types/express": "4.17.21", - "@types/node": "22.10.6", + "@nestjs/testing": "11.0.0", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "eslint": "9.18.0", "eslint-plugin-prettier": "5.2.2",