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

ES Module Guardrail Config

Configure a lint setup that keeps a browser-oriented ES module codebase free of legacy module patterns. The configuration should be easy to drop into projects that want strict ES module usage and clear module intent.

Capabilities

Rejects CommonJS in modules

  • Linting a file that calls require() and assigns module.exports reports both usages as violations; converting those statements to import/export lets the file pass @test

Blocks AMD patterns

  • Linting a file that wraps logic in AMD define/require callbacks fails; removing the AMD wrapper while keeping the same imports/exports allows the file to pass @test

Forbids dynamic loaders

  • Linting a file that interpolates paths inside require() or prefixes imports with loader syntax (e.g., style-loader!./styles.css) reports violations; static specifiers without loader prefixes pass @test

Demands unambiguous modules

  • A file that contains no import/export syntax is flagged as ambiguous; adding explicit ESM imports/exports clears the violation @test

Implementation

@generates

API

import type { Linter } from "eslint";

/**
 * Flat config that enforces ES module-only patterns and blocks legacy loaders for browser-oriented projects.
 */
const moduleGuardrailsConfig: Linter.FlatConfig[];
export default moduleGuardrailsConfig;

Dependencies { .dependencies }

eslint { .dependency }

ESLint engine used to run the flat config and evaluate files.

eslint-plugin-import-x { .dependency }

Provides module system guardrails for blocking legacy patterns and ambiguous modules.

Version

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