sindresorhus/eslint-plugin-unicorn
Rule proposal: `no-exports-in-scripts`
Closed
#2,513 opened on Dec 18, 2024
help wantednew rule
Repository metrics
- Stars
- (5,022 stars)
- PR merge metrics
- (Avg merge 1d 16h) (399 merged PRs in 30d)
Description
Description
Currently, a js file starts with hashbang #! is script file. In script file, using exports is useless and confused.
Fail
#!/usr/bin/env node
export const foo = {};
Pass
export {}
#!/usr/bin/env node
console.log('foo');
Proposed rule name
no-exports-in-scripts
Additional Info
No response