diff --git a/.vscode/settings.json b/.vscode/settings.json index 43ed1d2b..fe893c6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -40,6 +40,7 @@ "rabbitmq", "Requote", "rubiin", + "sonarjs", "SSSZ", "UNAUTHORISED" ] diff --git a/README.md b/README.md index c56f0345..4b0bff26 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,15 @@ More docs found at `docs` folder Also if you are into NestJS ecosystem you may be interested in one of my other libs: -[nestjs-easyconfig](https://github.com/rubiin/nestjs-pino) + +[helper-fns](https://github.com/rubiin/helper-fns) + +[![GitHub stars](https://img.shields.io/github/stars/rubiin/helper-fns?style=flat-square)](https://github.com/rubiin/helper-fns) +[![npm](https://img.shields.io/npm/dm/helper-fns?style=flat-square)](https://www.npmjs.com/package/helper-fns) + +A collection of helper functions for typescrip development. It includes functions for array,object,string,etc + +[nestjs-easyconfig](https://github.com/rubiin/nestjs-easyconfig) [![GitHub stars](https://img.shields.io/github/stars/rubiin/nestjs-easyconfig?style=flat-square)](https://github.com/rubiin/nestjs-easyconfig) [![npm](https://img.shields.io/npm/dm/nestjs-easyconfig?style=flat-square)](https://www.npmjs.com/package/nestjs-easyconfig) @@ -251,7 +259,7 @@ This is a cloudinary module for Nest. --- -[nestjs-pgpromise](https://github.com/segmentstream/nestjs-injectable) +[nestjs-pgpromise](https://github.com/rubiin/nestjs-pgpromise) [![GitHub stars](https://img.shields.io/github/stars/rubiin/nestjs-pgpromise?style=flat-square)](https://github.com/rubiin/nestjs-pgpromise) [![npm](https://img.shields.io/npm/dm/nestjs-pgpromise?style=flat-square)](https://www.npmjs.com/package/nestjs-pgpromise) diff --git a/eslint.config.js b/eslint.config.js index ca08451c..162c2cb2 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -20,6 +20,7 @@ module.exports = rubiin({ "ts/no-unsafe-assignment": "off", // optimize this "ts/no-unsafe-member-access": "off", // optimize this "unicorn/prefer-top-level-await": "off", + "sonarjs/no-duplicate-string": ["error", { "threshold": 10 }], "ts/no-misused-promises": [ "error", { diff --git a/src/_mocks_/index.ts b/src/_mocks_/index.ts index 156ec77d..0f0b6b91 100644 --- a/src/_mocks_/index.ts +++ b/src/_mocks_/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable ts/no-unsafe-return */ import path from "node:path"; import type { Request, Response } from "express"; import type { AmqpConnection } from "@golevelup/nestjs-rabbitmq"; @@ -99,21 +98,23 @@ export const refreshToken = new RefreshToken({ export const protocol = new Protocol(mockedProtocol); export const mockEm = createMock(); + +const payload = { + xss: "