ESLint plugin providing comprehensive linting rules for ES2015+ import/export syntax with static analysis and module system enforcement.
80
Build a linting setup that enforces ES module import/export correctness for a small JavaScript codebase.
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. @testsrc/invalid/bad-named.js fails because it requests a named import (e.g., total) that src/valid/math.js does not export.src/invalid/bad-default.js fails because it default-imports src/valid/math.js, which should be treated as a named-exports-only module. @testsrc/invalid/missing-path.js fails because the referenced module path cannot be resolved using the configured extensions.src/invalid/self-cycle.js fails because the module directly imports itself (including via a relative alias). @testsrc/**/*.js files and enforces the behaviors above.src/valid and src/invalid.@generates
export default [
// Flat config entries enabling import/export validation for src/**/*.js
];Lints ES module import/export correctness.
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