mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
958 stars 167 forks source link

Docs: node/no-unpublished-import #280

Open thernstig opened 3 years ago

thernstig commented 3 years ago

https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md says:

ECMAScript 2015 (ES6) does not define the lookup logic and Node does not support modules yet. So this rule spec might be changed in future.

This is not true as of today. Node.js 10, which was the last version not supporting ESM, has reached EOL. All current versions (12 and up) support modules.

thernstig commented 3 years ago

In addition I have trouble with this:

import fetch from 'node-fetch';

This file is located at tests/suite/util.js. The package.json is located at the same root as tests above. Yet I still get the warning "node-fetch" is not published.eslintnode/no-unpublished-import

Is this due to the "changed in the future" above, is that referring to this problem?