CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-eslint-plugin-import-x

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

80

0.96x
Overview
Eval results
Files

task.mdevals/scenario-10/

Custom Import Ordering Lint Config

Create a lint configuration that enforces a custom ES module import order for JavaScript/TypeScript files using a flat config.

Capabilities

Groups imports with aliases

  • Lint passes when modules are grouped in this order with a blank line between each group: side-effect imports, Node built-ins, external packages, internal alias imports using the @app/ prefix, parent paths (../), sibling paths (./), and index (.). @test
  • Lint reports and auto-fixes when an @app/ alias import is placed with external packages or when parent/sibling imports appear before the alias group. @test

Alphabetizes within groups

  • Imports inside each group are sorted ascending, case-insensitive, with type-only imports listed after value imports while retaining alphabetical order. @test

Flags misplaced side-effect imports

  • Side-effect-only imports must appear before any other group and are reported if placed later. @test

Implementation

@generates

API

// Export a flat config array that enables the import ordering rules
const config = [
  /* config entries */
];

export default config;

Dependencies { .dependencies }

eslint-plugin-import-x { .dependency }

Provides import analysis and ordering controls for ESLint.

Install with Tessl CLI

npx tessl i tessl/npm-eslint-plugin-import-x

tile.json