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

Dynamic Import Chunkname Validator

A lint helper that ensures every dynamic import includes a webpack chunk name comment matching a kebab-case pattern.

Capabilities

Accepts valid chunk naming

  • Returns valid: true and no messages when the source contains dynamic imports annotated with webpack chunk name comments matching feature-<slug> (for example, importing "./settings" with /* webpackChunkName: "feature-settings" */). @test

Flags missing chunk names

  • Returns valid: false with one message when a dynamic import lacks a webpack chunk name comment, mentioning the imported module specifier. @test

Flags malformed chunk names

  • Returns valid: false with one message when a webpack chunk name comment is present but not kebab-case (for example, FeatureSettings), mentioning the offending chunk name. @test

Implementation

@generates

API

export interface ChunknameMessage {
  line: number;
  column: number;
  message: string;
}

export interface ChunknameReport {
  valid: boolean;
  messages: ChunknameMessage[];
}

/**
 * Lints JavaScript module source for webpack chunk name comments on dynamic imports.
 * All chunk names must exist and match the kebab-case pattern `^[a-z]+(?:-[a-z0-9]+)*$`.
 *
 * @param source Module contents to lint.
 * @returns Report with validity flag and collected messages.
 */
export function validateDynamicImports(source: string): ChunknameReport;

Dependencies { .dependencies }

eslint-plugin-import-x { .dependency }

Provides linting rule support for enforcing webpack chunk name comments on dynamic imports. @satisfied-by

Version

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