eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

Suggestion: No Export in a Shebang file

Open MatanGbr opened this issue 3 years ago • 1 comments

I feel like this rule would help a lot of new node users that love making CLI & bin application with it (like me😊).

I have a large CLI app with functions imported and exported from other files and found out (after too much debugging) that exporting a function from a file that has a shebang declaration the top of it (like #! /usr/bin/env node) gives a lot of trouble in execution.

I would suggest an optional rule that looks for export in a shebang file and alert about it.

MatanGbr avatar May 31 '22 13:05 MatanGbr

eslint-plugin-n is the maintained version of this module.

We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.

Try that module out and if it isn't fixed there, then open a new issue in that project.

voxpelli avatar Aug 13 '23 12:08 voxpelli