import/unambiguous
eslint-plugin-import
No autofix
eslint.config.js
import importPlugin from "eslint-plugin-import";
export default [
{
plugins: { import: importPlugin },
rules: {
"import/unambiguous": "error",
},
},
];The documentation shows no incorrect example for this rule.
import 'foo'
function x() { return 42 }export function x() { return 42 }(function x() { return 42 })()
export {} // simple way to mark side-effects-only file as 'module' without any imports/exportsExamples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
import/unambiguous
eslint-plugin-import
import importPlugin from "eslint-plugin-import";
export default [
{
plugins: { import: importPlugin },
rules: {
"import/unambiguous": "error",
},
},
];import/unambiguous
import plugin · restriction
{
"plugins": [
"import"
],
"rules": {
"import/unambiguous": "error"
}
}Biome does not have this rule.
Forbid importing modules from parent directories.
Enforce either using, or omitting, the node: protocol when importing Node.js builtin modules.
Forbid imported names marked with @deprecated documentation tag.
Enforce the maximum number of dependencies a module can have.