lint: require for all type imports to be import type

This commit is contained in:
b1ek 2024-07-27 21:31:25 +10:00
parent 13a6ea89ef
commit a351dd6aee
Signed by: blek
GPG Key ID: 14546221E3595D0C
4 changed files with 12 additions and 7 deletions

View File

@ -21,6 +21,7 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [ 'error', { args: 'none' } ], '@typescript-eslint/no-unused-vars': [ 'error', { args: 'none' } ],
'@typescript-eslint/consistent-type-imports': 'error',
'no-unused-vars': [ 'error', { args: 'none' } ], 'no-unused-vars': [ 'error', { args: 'none' } ],
'indent': 'off' 'indent': 'off'
}, },

View File

@ -1,10 +1,12 @@
import ky, { ResponsePromise } from 'ky' import type { ResponsePromise } from 'ky';
import { import ky from 'ky'
import type {
AdditionalData, AdditionalData,
GetOperationReturn, GetOperationReturn,
HKPOperation, HKPOperation,
} from './abstract.provider.js' } from './abstract.provider.js'
import { Indexes, parseIndexes } from '../indexes.js' import type { Indexes} from '../indexes.js';
import { parseIndexes } from '../indexes.js'
const BEGIN_HEADER = '-----BEGIN PGP PUBLIC KEY BLOCK-----' const BEGIN_HEADER = '-----BEGIN PGP PUBLIC KEY BLOCK-----'
const END_HEADER = '-----END PGP PUBLIC KEY BLOCK-----' const END_HEADER = '-----END PGP PUBLIC KEY BLOCK-----'

View File

@ -1,6 +1,7 @@
import type {
NestFastifyApplication} from '@nestjs/platform-fastify';
import { import {
FastifyAdapter, FastifyAdapter
NestFastifyApplication,
} from '@nestjs/platform-fastify' } from '@nestjs/platform-fastify'
import { NestFactory } from '@nestjs/core' import { NestFactory } from '@nestjs/core'
import handlebars from 'hbs' import handlebars from 'hbs'

View File

@ -1,5 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing' import type { TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common' import { Test } from '@nestjs/testing'
import type { INestApplication } from '@nestjs/common'
import request from 'supertest' import request from 'supertest'
import { AppModule } from './../src/app.module.js' import { AppModule } from './../src/app.module.js'