Skip to content

Commit

Permalink
Merge pull request #1680 from mightyiam/no-import-type-side-effects
Browse files Browse the repository at this point in the history
feat!: @typescript-eslint/no-import-type-side-effects
  • Loading branch information
mightyiam authored Jul 23, 2024
2 parents b228e09 + 9970ecf commit a50bd6a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const rules = {
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
'@typescript-eslint/no-import-type-side-effects': ['error'],
'@typescript-eslint/no-invalid-void-type': ['error'],
'@typescript-eslint/no-loss-of-precision': ['error'],
'@typescript-eslint/no-misused-new': ['error'],
Expand Down
6 changes: 3 additions & 3 deletions src/plugins.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
declare module 'eslint-plugin-n' {
import { type TSESLint } from '@typescript-eslint/utils'
import type { TSESLint } from '@typescript-eslint/utils'
const plugin: TSESLint.Linter.Plugin
export = plugin
}
declare module 'eslint-plugin-import' {
import { type TSESLint } from '@typescript-eslint/utils'
import type { TSESLint } from '@typescript-eslint/utils'
const plugin: TSESLint.Linter.Plugin
export = plugin
}
declare module 'eslint-plugin-promise' {
import { type TSESLint } from '@typescript-eslint/utils'
import type { TSESLint } from '@typescript-eslint/utils'
const plugin: TSESLint.Linter.Plugin
export = plugin
}
3 changes: 2 additions & 1 deletion src/test/_expected-exported-value.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type TSESLint } from '@typescript-eslint/utils'
import type { TSESLint } from '@typescript-eslint/utils'
import { parser, plugin as tseslintPlugin } from 'typescript-eslint'
import * as importPlugin from 'eslint-plugin-import'
import * as nPlugin from 'eslint-plugin-n'
Expand Down Expand Up @@ -334,6 +334,7 @@ export const expectedExportedValue: TSESLint.FlatConfig.Config = {
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
'@typescript-eslint/no-import-type-side-effects': ['error'],
'@typescript-eslint/no-invalid-void-type': ['error'],
'@typescript-eslint/no-loss-of-precision': ['error'],
'@typescript-eslint/no-misused-new': ['error'],
Expand Down
1 change: 0 additions & 1 deletion src/test/_rules_to_consider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const rulesToConsider = [
'@typescript-eslint/no-empty-object-type',
'@typescript-eslint/no-import-type-side-effects',
'@typescript-eslint/no-inferrable-types',
'@typescript-eslint/no-invalid-this',
'@typescript-eslint/no-loop-func',
Expand Down
2 changes: 1 addition & 1 deletion src/test/_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import exported from '..'
import { plugin as tseslintPlugin } from 'typescript-eslint'
import { TSESLint } from '@typescript-eslint/utils'
import semver from 'semver'
import { type PackageJson } from 'type-fest'
import type { PackageJson } from 'type-fest'

interface PkgDetails {
pkgPath: string
Expand Down

0 comments on commit a50bd6a

Please sign in to comment.