diff --git a/sample/12-graphql-schema-first/.eslintrc.js b/sample/12-graphql-schema-first/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/12-graphql-schema-first/.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/12-graphql-schema-first/eslint.config.mjs b/sample/12-graphql-schema-first/eslint.config.mjs new file mode 100644 index 00000000000..e297312aefb --- /dev/null +++ b/sample/12-graphql-schema-first/eslint.config.mjs @@ -0,0 +1,43 @@ +// @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', + '@typescript-eslint/unbound-method': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/12-graphql-schema-first/package.json b/sample/12-graphql-schema-first/package.json index 5cb8a8faa4a..bf081b8abf1 100644 --- a/sample/12-graphql-schema-first/package.json +++ b/sample/12-graphql-schema-first/package.json @@ -22,31 +22,31 @@ "@apollo/server": "4.11.3", "@graphql-tools/utils": "10.7.2", "@nestjs/apollo": "12.2.2", - "@nestjs/common": "10.4.15", - "@nestjs/core": "10.4.15", + "@nestjs/common": "11.0.1", + "@nestjs/core": "11.0.1", "@nestjs/graphql": "12.2.2", - "@nestjs/platform-express": "10.4.15", + "@nestjs/platform-express": "11.0.1", "class-transformer": "0.5.1", "class-validator": "0.14.1", - "graphql": "16.8.1", - "graphql-subscriptions": "2.0.0", + "graphql": "16.10.0", + "graphql-subscriptions": "3.0.0", "reflect-metadata": "0.2.2", "rimraf": "6.0.1", "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@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", + "@nestjs/testing": "11.0.1", + "@types/express": "5.0.0", "@types/jest": "29.5.14", - "@types/node": "22.10.6", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", "jest": "29.7.0", "prettier": "3.4.2", "supertest": "7.0.0", @@ -55,7 +55,8 @@ "ts-morph": "25.0.0", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "typescript": "5.7.3" + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" }, "jest": { "moduleFileExtensions": [ diff --git a/sample/12-graphql-schema-first/src/cats/cats.resolver.ts b/sample/12-graphql-schema-first/src/cats/cats.resolver.ts index e4876f96811..93a0639b0bb 100644 --- a/sample/12-graphql-schema-first/src/cats/cats.resolver.ts +++ b/sample/12-graphql-schema-first/src/cats/cats.resolver.ts @@ -28,13 +28,13 @@ export class CatsResolver { @Mutation('createCat') async create(@Args('createCatInput') args: CreateCatDto): Promise { - const createdCat = await this.catsService.create(args); + const createdCat = this.catsService.create(args); pubSub.publish('catCreated', { catCreated: createdCat }); return createdCat; } @Subscription('catCreated') catCreated() { - return pubSub.asyncIterator('catCreated'); + return pubSub.asyncIterableIterator('catCreated'); } } diff --git a/sample/12-graphql-schema-first/src/graphql.schema.ts b/sample/12-graphql-schema-first/src/graphql.schema.ts index 47a938f4054..811f032df69 100644 --- a/sample/12-graphql-schema-first/src/graphql.schema.ts +++ b/sample/12-graphql-schema-first/src/graphql.schema.ts @@ -5,7 +5,7 @@ */ /* tslint:disable */ -/* eslint-disable */ + export class CreateCatInput { name?: Nullable; age?: Nullable; diff --git a/sample/13-mongo-typeorm/.eslintrc.js b/sample/13-mongo-typeorm/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/13-mongo-typeorm/.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/13-mongo-typeorm/eslint.config.mjs b/sample/13-mongo-typeorm/eslint.config.mjs new file mode 100644 index 00000000000..86bd271de77 --- /dev/null +++ b/sample/13-mongo-typeorm/eslint.config.mjs @@ -0,0 +1,41 @@ +// @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/no-unused-vars': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/13-mongo-typeorm/package.json b/sample/13-mongo-typeorm/package.json index 08397f374a0..b6b774dc43a 100644 --- a/sample/13-mongo-typeorm/package.json +++ b/sample/13-mongo-typeorm/package.json @@ -19,9 +19,9 @@ "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/common": "11.0.1", + "@nestjs/core": "11.0.1", + "@nestjs/platform-express": "11.0.1", "@nestjs/typeorm": "10.0.2", "mongodb": "6.12.0", "reflect-metadata": "0.2.2", @@ -34,7 +34,7 @@ "@eslint/js": "9.18.0", "@nestjs/cli": "10.4.9", "@nestjs/schematics": "10.2.3", - "@nestjs/testing": "11.0.0", + "@nestjs/testing": "11.0.1", "@types/express": "5.0.0", "@types/jest": "29.5.14", "@types/node": "22.10.7", diff --git a/sample/14-mongoose-base/.eslintrc.js b/sample/14-mongoose-base/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/14-mongoose-base/.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/14-mongoose-base/eslint.config.mjs b/sample/14-mongoose-base/eslint.config.mjs new file mode 100644 index 00000000000..0c8a9ec0fc0 --- /dev/null +++ b/sample/14-mongoose-base/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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/14-mongoose-base/package.json b/sample/14-mongoose-base/package.json index d442cd9a6f1..3f34f3eac95 100644 --- a/sample/14-mongoose-base/package.json +++ b/sample/14-mongoose-base/package.json @@ -19,9 +19,9 @@ "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/common": "11.0.1", + "@nestjs/core": "11.0.1", + "@nestjs/platform-express": "11.0.1", "mongoose": "8.9.5", "reflect-metadata": "0.2.2", "rimraf": "6.0.1", @@ -32,7 +32,7 @@ "@eslint/js": "9.18.0", "@nestjs/cli": "10.4.9", "@nestjs/schematics": "10.2.3", - "@nestjs/testing": "11.0.0", + "@nestjs/testing": "11.0.1", "@types/express": "5.0.0", "@types/jest": "29.5.14", "@types/node": "22.10.7", diff --git a/sample/15-mvc/.eslintrc.js b/sample/15-mvc/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/15-mvc/.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/15-mvc/eslint.config.mjs b/sample/15-mvc/eslint.config.mjs new file mode 100644 index 00000000000..0c8a9ec0fc0 --- /dev/null +++ b/sample/15-mvc/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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/15-mvc/package.json b/sample/15-mvc/package.json index dead1d56504..86332f71f17 100644 --- a/sample/15-mvc/package.json +++ b/sample/15-mvc/package.json @@ -19,20 +19,22 @@ "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/common": "11.0.1", + "@nestjs/core": "11.0.1", + "@nestjs/platform-express": "11.0.1", "hbs": "4.2.0", "reflect-metadata": "0.2.2", "rimraf": "6.0.1", "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@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.1", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -41,11 +43,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } } diff --git a/sample/16-gateways-ws/.eslintrc.js b/sample/16-gateways-ws/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/16-gateways-ws/.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/16-gateways-ws/eslint.config.mjs b/sample/16-gateways-ws/eslint.config.mjs new file mode 100644 index 00000000000..0c8a9ec0fc0 --- /dev/null +++ b/sample/16-gateways-ws/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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/16-gateways-ws/package.json b/sample/16-gateways-ws/package.json index 212b060b220..819a799f879 100644 --- a/sample/16-gateways-ws/package.json +++ b/sample/16-gateways-ws/package.json @@ -19,25 +19,27 @@ "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/platform-ws": "10.4.15", - "@nestjs/websockets": "10.4.15", + "@nestjs/common": "11.0.1", + "@nestjs/core": "11.0.1", + "@nestjs/platform-express": "11.0.1", + "@nestjs/platform-ws": "11.0.1", + "@nestjs/websockets": "11.0.1", "class-transformer": "0.5.1", "class-validator": "0.14.1", "rimraf": "6.0.1", "reflect-metadata": "0.2.2", "rxjs": "7.8.1", - "ws": "8.17.1" + "ws": "8.18.0" }, "devDependencies": { - "@types/ws": "8.5.5", + "@types/ws": "8.5.13", + "@eslint/eslintrc": "3.2.0", + "@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.1", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -46,11 +48,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } } diff --git a/sample/17-mvc-fastify/.eslintrc.js b/sample/17-mvc-fastify/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/17-mvc-fastify/.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/17-mvc-fastify/eslint.config.mjs b/sample/17-mvc-fastify/eslint.config.mjs new file mode 100644 index 00000000000..c3eec95e2f6 --- /dev/null +++ b/sample/17-mvc-fastify/eslint.config.mjs @@ -0,0 +1,43 @@ +// @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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/no-require-imports': 'off' + }, + }, +); \ No newline at end of file diff --git a/sample/17-mvc-fastify/package.json b/sample/17-mvc-fastify/package.json index a3179f9254a..eb3a727b1f9 100644 --- a/sample/17-mvc-fastify/package.json +++ b/sample/17-mvc-fastify/package.json @@ -1,53 +1,54 @@ { - "name": "nest-typescript-starter", - "version": "1.0.0", - "description": "Nest TypeScript starter repository", - "license": "MIT", - "scripts": { - "prebuild": "rimraf dist", - "build": "nest build", - "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", - "start": "nest start", - "start:dev": "nest start --watch", - "start:debug": "nest start --debug --watch", - "start:prod": "node dist/main", - "lint": "eslint '{src,apps,libs,test}/**/*.ts' --fix", - "test": "jest", - "test:watch": "jest --watch", - "test:cov": "jest --coverage", - "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "test:e2e": "echo 'No e2e tests implemented yet.'" - }, - "dependencies": { - "@nestjs/common": "10.4.15", - "@nestjs/core": "10.4.15", - "@nestjs/platform-fastify": "10.4.15", - "@fastify/static": "8.0.4", - "handlebars": "4.7.8", - "@fastify/view": "10.0.2", - "reflect-metadata": "0.2.2", - "rimraf": "6.0.1", - "rxjs": "7.8.1" - }, - "devDependencies": { - "@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", - "@types/supertest": "6.0.2", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", - "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "jest": "29.7.0", - "prettier": "3.4.2", - "supertest": "7.0.0", - "ts-jest": "29.2.5", - "ts-loader": "9.5.2", - "ts-node": "10.9.2", - "tsconfig-paths": "4.2.0", - "typescript": "5.7.3" - } + "name": "nest-typescript-starter", + "version": "1.0.0", + "description": "Nest TypeScript starter repository", + "license": "MIT", + "scripts": { + "prebuild": "rimraf dist", + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint '{src,apps,libs,test}/**/*.ts' --fix", + "test": "jest", + "test:watch": "jest --watch", + "test:cov": "jest --coverage", + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", + "test:e2e": "echo 'No e2e tests implemented yet.'" + }, + "dependencies": { + "@nestjs/common": "11.0.1", + "@nestjs/core": "11.0.1", + "@nestjs/platform-fastify": "11.0.1", + "@fastify/static": "8.0.4", + "handlebars": "4.7.8", + "@fastify/view": "10.0.2", + "reflect-metadata": "0.2.2", + "rimraf": "6.0.1", + "rxjs": "7.8.1" + }, + "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@eslint/js": "9.18.0", + "@nestjs/cli": "10.4.9", + "@nestjs/schematics": "10.2.3", + "@nestjs/testing": "11.0.1", + "@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", + "globals": "15.14.0", + "jest": "29.7.0", + "prettier": "3.4.2", + "supertest": "7.0.0", + "ts-jest": "29.2.5", + "ts-loader": "9.5.2", + "ts-node": "10.9.2", + "tsconfig-paths": "4.2.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" + } } diff --git a/sample/18-context/.eslintrc.js b/sample/18-context/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/18-context/.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/18-context/eslint.config.mjs b/sample/18-context/eslint.config.mjs new file mode 100644 index 00000000000..c3eec95e2f6 --- /dev/null +++ b/sample/18-context/eslint.config.mjs @@ -0,0 +1,43 @@ +// @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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/no-require-imports': 'off' + }, + }, +); \ No newline at end of file diff --git a/sample/18-context/package.json b/sample/18-context/package.json index 2f7b1a6bfb2..d9c410d9c1d 100644 --- a/sample/18-context/package.json +++ b/sample/18-context/package.json @@ -19,16 +19,18 @@ "test:e2e": "echo 'No e2e tests implemented yet.'" }, "dependencies": { - "@nestjs/common": "10.4.15", - "@nestjs/core": "10.4.15", + "@nestjs/common": "11.0.1", + "@nestjs/core": "11.0.1", "reflect-metadata": "0.2.2", "rimraf": "6.0.1", "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@eslint/js": "9.18.0", "@nestjs/cli": "10.4.9", "@nestjs/schematics": "10.2.3", - "@types/node": "22.10.6", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -37,11 +39,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } } diff --git a/sample/19-auth-jwt/.eslintrc.js b/sample/19-auth-jwt/.eslintrc.js deleted file mode 100644 index 28471954809..00000000000 --- a/sample/19-auth-jwt/.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/19-auth-jwt/eslint.config.mjs b/sample/19-auth-jwt/eslint.config.mjs new file mode 100644 index 00000000000..d6b5176aff4 --- /dev/null +++ b/sample/19-auth-jwt/eslint.config.mjs @@ -0,0 +1,44 @@ +// @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/no-unused-vars': 'warn', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'warn', + }, + }, +); \ No newline at end of file diff --git a/sample/19-auth-jwt/nodemon-debug.json b/sample/19-auth-jwt/nodemon-debug.json deleted file mode 100644 index 052b0236723..00000000000 --- a/sample/19-auth-jwt/nodemon-debug.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "watch": ["src"], - "ext": "ts", - "ignore": ["src/**/*.spec.ts"], - "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts" -} diff --git a/sample/19-auth-jwt/nodemon.json b/sample/19-auth-jwt/nodemon.json deleted file mode 100644 index 512e59aba97..00000000000 --- a/sample/19-auth-jwt/nodemon.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "watch": ["dist"], - "ext": "js", - "exec": "node dist/main" -} diff --git a/sample/19-auth-jwt/package.json b/sample/19-auth-jwt/package.json index 3f9828f0924..8a15616ef7d 100644 --- a/sample/19-auth-jwt/package.json +++ b/sample/19-auth-jwt/package.json @@ -20,11 +20,11 @@ "test:e2e": "jest --config ./e2e/jest-e2e.json" }, "dependencies": { - "@nestjs/common": "10.4.15", - "@nestjs/core": "10.4.15", + "@nestjs/common": "11.0.1", + "@nestjs/core": "11.0.1", "@nestjs/jwt": "10.2.0", - "@nestjs/passport": "10.0.3", - "@nestjs/platform-express": "10.4.15", + "@nestjs/passport": "11.0.0", + "@nestjs/platform-express": "11.0.1", "reflect-metadata": "0.2.2", "rimraf": "6.0.1", "rxjs": "7.8.1" @@ -34,7 +34,7 @@ "@eslint/js": "9.18.0", "@nestjs/cli": "10.4.9", "@nestjs/schematics": "10.2.3", - "@nestjs/testing": "11.0.0", + "@nestjs/testing": "11.0.1", "@types/express": "5.0.0", "@types/jest": "29.5.14", "@types/node": "22.10.7", diff --git a/sample/21-serializer/package.json b/sample/21-serializer/package.json index 3e5e47188d6..fa358d0c8f9 100644 --- a/sample/21-serializer/package.json +++ b/sample/21-serializer/package.json @@ -28,11 +28,13 @@ "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@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.1", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -41,11 +43,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } } diff --git a/sample/24-serve-static/package.json b/sample/24-serve-static/package.json index 1cdd7cad572..5759b9dd09d 100644 --- a/sample/24-serve-static/package.json +++ b/sample/24-serve-static/package.json @@ -30,11 +30,13 @@ "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@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.1", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -43,11 +45,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } } diff --git a/sample/33-graphql-mercurius/package.json b/sample/33-graphql-mercurius/package.json index bdaab935bed..cfaeb2352ec 100644 --- a/sample/33-graphql-mercurius/package.json +++ b/sample/33-graphql-mercurius/package.json @@ -32,11 +32,13 @@ "rxjs": "7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "3.2.0", + "@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.1", + "@types/express": "5.0.0", + "@types/node": "22.10.7", "@types/supertest": "6.0.2", "jest": "29.7.0", "prettier": "3.4.2", @@ -45,11 +47,10 @@ "ts-loader": "9.5.2", "ts-node": "10.9.2", "tsconfig-paths": "4.2.0", - "@typescript-eslint/eslint-plugin": "5.62.0", - "@typescript-eslint/parser": "5.62.0", "eslint": "9.18.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-import": "2.31.0", - "typescript": "5.7.3" + "eslint-plugin-prettier": "5.2.2", + "globals": "15.14.0", + "typescript": "5.7.3", + "typescript-eslint": "8.20.0" } }