eslint-plugin-perfectionist
Version:
ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
18 lines (17 loc) • 582 B
TypeScript
import { TSESLint } from '@typescript-eslint/utils'
import { SortImportsNode } from './types.js'
/**
* Determines whether the given AST node is a side-effect import.
*
* @param props - The parameters object.
* @param props.sourceCode - ESLint source code object for text extraction.
* @param props.node - The AST node representing an import-like declaration.
* @returns True if the node is a side-effect import; otherwise, false.
*/
export declare function isSideEffectImport({
sourceCode,
node,
}: {
sourceCode: TSESLint.SourceCode
node: SortImportsNode
}): boolean