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-9/

Case-Safe Resolver Utilities

Build a helper module that exposes cache-aware path validation and an ESM-friendly bridge for loading CommonJS artifacts. The dependency supplies the resolution cache and interop helpers; your implementation should wire them together.

Capabilities

Case-aware resolution cache

  • Given an existing file path with correct casing, returns true and reuses the dependency-provided cache so repeated checks for the same path do not hit the filesystem twice. @test
  • Given a path with incorrect casing on a case-sensitive filesystem, returns false while still caching the result to avoid repeated work. @test

ESM-safe CommonJS loader

  • From an ESM context, loads metadata from a sibling package.json using the dependency's CommonJS bridge and returns an object containing name and version. @test
  • When the target JSON file is missing, surfaces the dependency helper's thrown error without wrapping or swallowing it. @test

Implementation

@generates

API

export type CacheLifetime = number | '∞' | 'Infinity';

export interface CacheSettings {
  lifetime?: CacheLifetime;
}

export function checkPathCase(
  filepath: string | null,
  cacheSettings: CacheSettings,
  strict?: boolean,
): boolean;

export function loadPackageMetadata(
  moduleUrl: string,
  relativePath?: string,
): { name?: string; version?: string; [key: string]: unknown };

Dependencies { .dependencies }

eslint-plugin-import-x { .dependency }

Provides cache-aware resolution helpers and an ESM-safe require utility for interop with CommonJS assets.

Version

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