CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-eslint-plugin-import-x

tessl install tessl/npm-eslint-plugin-import-x@3.1.0

ESLint plugin providing comprehensive linting rules for ES2015+ import/export syntax with static analysis and module system enforcement.

Agent Success

Agent success rate when using this tile

80%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.96x

Baseline

Agent success rate without this tile

83%

task.mdevals/scenario-2/

Node-Style Import Resolver

Build a small utility that exposes a configurable Node-style resolver for import paths so that linting rules can resolve modules the same way as Node does under custom conditions.

Capabilities

Builtin and data URL handling

  • Resolving a Node builtin module name (for example fs) reports it as found with a null path instead of hitting the filesystem. @test
  • Resolving a data: URL returns found with a null path. @test

Extension-aware resolution

  • When extensions includes .ts, resolving ./utils/helpers from fixtures/app/src/index.ts yields the absolute path to fixtures/app/src/utils/helpers.ts. @test

Condition priority

  • When conditionNames is set to ['require', 'default'], resolving pkg-conditional from fixtures/app/src/index.ts selects the require export and returns fixtures/vendor/pkg-conditional/cjs.js. @test

Additional module directories

  • When modules includes fixtures/vendor, resolving the bare specifier vendor-tool from fixtures/app/src/index.ts returns the path to fixtures/vendor/vendor-tool/index.js. @test

Implementation

@generates

API

export interface ResolverOptions {
  extensions?: string[];
  conditionNames?: string[];
  modules?: string[];
}

export interface ResolveResult {
  found: boolean;
  path?: string | null;
}

export interface ImportResolver {
  interfaceVersion: 3;
  name: string;
  resolve(moduleId: string, sourceFile: string): ResolveResult;
}

export function buildResolver(options?: ResolverOptions): ImportResolver;

Dependencies { .dependencies }

eslint-plugin-import-x { .dependency }

Provides a Node-style resolver factory for ESLint import resolution in flat config setups.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/eslint-plugin-import-x@3.1.x
tile.json