Skip to content

Commit 1ba821d

Browse files
committed
chore: make eslint happy
1 parent 3b02273 commit 1ba821d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,5 @@ export = {
182182
configs,
183183
flatConfigs,
184184
rules,
185-
importXResolverCompat
185+
importXResolverCompat,
186186
}

src/utils/resolve.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ function fullResolve(
146146
: `settings['import-x/resolver-next'][${i}]`
147147

148148
if (!isValidNewResolver(resolver)) {
149-
const err = new TypeError(`${resolverName} is not a valid import resolver for eslint-plugin-import-x!`)
149+
const err = new TypeError(
150+
`${resolverName} is not a valid import resolver for eslint-plugin-import-x!`,
151+
)
150152
err.name = IMPORT_RESOLVE_ERROR_NAME
151153
throw err
152154
}
@@ -236,7 +238,10 @@ export function resolve(p: string, context: RuleContext) {
236238
}
237239
}
238240

239-
export function importXResolverCompat(resolver: LegacyResolver | NewResolver, resolverOptions: unknown = {}): NewResolver {
241+
export function importXResolverCompat(
242+
resolver: LegacyResolver | NewResolver,
243+
resolverOptions: unknown = {},
244+
): NewResolver {
240245
// Somehow the resolver is already using v3 interface
241246
if (isValidNewResolver(resolver)) {
242247
return resolver

test/utils/resolve.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import type { TSESLint } from '@typescript-eslint/utils'
66

77
import { testContext, testFilePath } from '../utils'
88

9+
import eslintPluginImportX from 'eslint-plugin-import-x'
910
import {
1011
CASE_SENSITIVE_FS,
1112
fileExistsWithCaseSync,
12-
resolve
13+
resolve,
1314
} from 'eslint-plugin-import-x/utils'
1415

15-
import eslintPluginImportX from 'eslint-plugin-import-x'
16-
const { importXResolverCompat } = eslintPluginImportX;
16+
const { importXResolverCompat } = eslintPluginImportX
1717

1818
describe('resolve', () => {
1919
it('throws on bad parameters', () => {

0 commit comments

Comments
 (0)