sample: another round of sample updates

This commit is contained in:
Kamil Myśliwiec
2025-01-16 11:26:10 +01:00
parent 5ce8c43116
commit 780fe91c29
3 changed files with 54 additions and 34 deletions

View File

@@ -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',
},
};

View File

@@ -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',
},
},
);

View File

@@ -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-fastify": "10.4.15",
"@nestjs/common": "11.0.0",
"@nestjs/core": "11.0.0",
"@nestjs/platform-fastify": "11.0.0",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
"reflect-metadata": "0.2.2",
@@ -29,17 +29,17 @@
"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.0",
"@types/express": "5.0.0",
"@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",
@@ -47,6 +47,7 @@
"ts-loader": "9.5.2",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "5.7.3"
"typescript": "5.7.3",
"typescript-eslint": "8.20.0"
}
}