Skip to content

Commit

Permalink
Merge pull request #59 from nanogiants/feature/fix-linting
Browse files Browse the repository at this point in the history
chore: fix linting issues
  • Loading branch information
dasheck0 authored Aug 7, 2023
2 parents 9d3fc45 + b02d488 commit 7766b33
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"prepare": "husky install",
"clean": "rimraf dist",
"prepublishOnly": "npm run clean && tsc -b tsconfig.build.json",
"lint": "eslint -c .eslintrc.js --ext .ts src",
"lint": "eslint -c .eslintrc.js --ext .ts src --fix",
"lint:all": "npm run lint && cd demo && npm run lint",
"prepack": "npm run lint && npm run prepublishOnly",
"test": "jest",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/example-content.util.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { HttpException } from '@nestjs/common';
import { ContentObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface';

import { buildPlaceholder } from '../builder/placeholder.builder';
import { MergedOptions, Placeholder, Template } from '../interfaces/options.interface';
import { merge } from './example.util';
import { buildSchema } from './schema.util';
import { buildMessageByType } from './type.util';
import { buildPlaceholder } from '../builder/placeholder.builder';
import { MergedOptions, Placeholder, Template } from '../interfaces/options.interface';

const PLACEHOLDER_IDENTIFIER = '$';
const isPlaceholder = (value: unknown): value is string =>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/schema.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { getSchemaPath } from '@nestjs/swagger';
import { getTypeIsArrayTuple } from '@nestjs/swagger/dist/decorators/helpers';
import { ReferenceObject, SchemaObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface';

import { MergedOptions, Options } from '../interfaces/options.interface';
import { resolveTemplatePlaceholders } from './example-content.util';
import { DefaultTemplateRequiredProperties } from './options.util';
import { MergedOptions, Options } from '../interfaces/options.interface';

type SchemaOrReference = SchemaObject | ReferenceObject;

Expand Down
2 changes: 1 addition & 1 deletion src/test/decorators/api-exception.decorator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { BadRequestException, ForbiddenException, NotFoundException } from '@nes
import { ApiOperation, ApiOperationOptions, ApiResponse, ApiResponseOptions } from '@nestjs/swagger';
import { DECORATORS } from '@nestjs/swagger/dist/constants';

import { ApiException, buildPlaceholder, buildTemplatedApiExceptionDecorator } from '../../lib';
import { BaseException, ExceptionWithoutError, UserUnauthorizedException } from './exceptions/BaseException';
import { BaseExceptionType } from './type/base-exception.type';
import { SwaggerAnnotations } from './type/swagger-annotation.type';
import { ApiException, buildPlaceholder, buildTemplatedApiExceptionDecorator } from '../../lib';

const TemplatedApiException = buildTemplatedApiExceptionDecorator({
statusCode: '$status',
Expand Down
6 changes: 5 additions & 1 deletion src/test/decorators/exceptions/BaseException.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { HttpException, HttpStatus } from '@nestjs/common';

export class BaseException extends HttpException {
constructor(response: string | Record<string, any>, status: number, private clientCode: number) {
constructor(
response: string | Record<string, any>,
status: number,
private clientCode: number,
) {
super(response, status);
}

Expand Down

0 comments on commit 7766b33

Please sign in to comment.