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

Import/Export Correctness Linting

Build a linting setup that enforces ES module import/export correctness for a small JavaScript codebase.

Capabilities

Valid modules pass

  • src/valid/math.js exports named helpers (for example add and multiply) with no default export, and src/valid/index.js imports those names without errors. @test

Named vs default validation

  • Linting src/invalid/bad-named.js fails because it requests a named import (e.g., total) that src/valid/math.js does not export.
  • Linting src/invalid/bad-default.js fails because it default-imports src/valid/math.js, which should be treated as a named-exports-only module. @test

Path and self-guardrails

  • Linting src/invalid/missing-path.js fails because the referenced module path cannot be resolved using the configured extensions.
  • Linting src/invalid/self-cycle.js fails because the module directly imports itself (including via a relative alias). @test

Implementation

  • Provide an ESLint configuration that enables import/export validation for src/**/*.js files and enforces the behaviors above.
  • Include runnable lint commands that target the sample files in src/valid and src/invalid.

@generates

API

export default [
  // Flat config entries enabling import/export validation for src/**/*.js
];

Dependencies { .dependencies }

eslint-plugin-import-x { .dependency }

Lints ES module import/export correctness.

Version

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