ESLint plugin providing comprehensive linting rules for ES2015+ import/export syntax with static analysis and module system enforcement.
80
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.
require() and assigns module.exports reports both usages as violations; converting those statements to import/export lets the file pass @testdefine/require callbacks fails; removing the AMD wrapper while keeping the same imports/exports allows the file to pass @testrequire() or prefixes imports with loader syntax (e.g., style-loader!./styles.css) reports violations; static specifiers without loader prefixes pass @test@generates
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;ESLint engine used to run the flat config and evaluate files.
Provides module system guardrails for blocking legacy patterns and ambiguous modules.
Install with Tessl CLI
npx tessl i tessl/npm-eslint-plugin-import-xdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10