mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
960 stars 170 forks source link

not triggering `no-extraneous-require` for submodules #335

Closed alex-Symbroson closed 2 years ago

alex-Symbroson commented 2 years ago

I have a project where I am requiring individual files of a self created module.

Example: Module has following structure:

mymodule/
- package.json
- index.js
- part.js

and my other project only requires part.js:

const part = require("mymodule/part");

What would be the correct steps to not trigger the no-extraneous-require rule? Or is this considered a bug that the rule doesn't specifically check for this?

alex-Symbroson commented 2 years ago

false report