diff --git a/.eslintrc.js b/.eslintrc.js index 4804f60..7d1a2bf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,5 +21,9 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-use-before-define': 'off', '@typescript-eslint/no-non-null-assertion': 'off', + + '@typescript-eslint/no-import-type-side-effects': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/consistent-type-exports': 'error', }, }; diff --git a/lib/http.module.ts b/lib/http.module.ts index beafba5..f056cd6 100644 --- a/lib/http.module.ts +++ b/lib/http.module.ts @@ -1,9 +1,10 @@ -import { DynamicModule, Module, Provider } from '@nestjs/common'; +import type { DynamicModule, Provider } from '@nestjs/common'; +import { Module } from '@nestjs/common'; import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util'; import Axios from 'axios'; import { AXIOS_INSTANCE_TOKEN, HTTP_MODULE_ID, HTTP_MODULE_OPTIONS } from './http.constants'; import { HttpService } from './http.service'; -import { HttpModuleAsyncOptions, HttpModuleOptions, HttpModuleOptionsFactory } from './interfaces'; +import type { HttpModuleAsyncOptions, HttpModuleOptions, HttpModuleOptionsFactory } from './interfaces'; import axiosRetry from 'axios-retry'; const createAxiosInstance = (config?: HttpModuleOptions) => { diff --git a/lib/interfaces/http-module.interface.ts b/lib/interfaces/http-module.interface.ts index 2d184e7..389b056 100644 --- a/lib/interfaces/http-module.interface.ts +++ b/lib/interfaces/http-module.interface.ts @@ -1,6 +1,6 @@ -import { ModuleMetadata, Provider, Type } from '@nestjs/common'; -import { AxiosRequestConfig } from 'axios'; -import IAxiosRetry from 'axios-retry'; +import type { ModuleMetadata, Provider, Type } from '@nestjs/common'; +import type { AxiosRequestConfig } from 'axios'; +import type IAxiosRetry from 'axios-retry'; export type HttpModuleOptions = AxiosRequestConfig &