eslint-plugin-beautiful-sort
Version:
eslint plugin for imports sort by their type
30 lines (29 loc) • 819 B
TypeScript
import { ImportDeclaration } from 'estree';
import { SortTable } from './sort-imports.utils';
import { Type } from './type.enum';
export interface ImportNodeParams {
special: RegExp[];
sortTable: SortTable;
}
export declare class ImportNode {
private node;
private params;
private type;
constructor(node: ImportDeclaration, params: ImportNodeParams);
private getSpecialNumber;
private specialCompare;
private getSortTableNumber;
private sortTableCompare;
private isSpecialNode;
compare(target: ImportNode): number;
getNode(): ImportDeclaration;
getImportPath(): string;
getType(): Type | null;
private calculateType;
private isSpecial;
private isDefault;
private isDefaultObj;
private isObj;
private isNone;
private isNamespace;
}