sindresorhus/eslint-plugin-unicorn

Rule proposal: `no-exports-in-scripts`

Open

#2,513 opened on 2024年12月18日

GitHub で見る
 (3 comments) (3 reactions) (0 assignees)JavaScript (5,022 stars) (468 forks)user submission
help wantednew rule

説明

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

コントリビューターガイド

Rule proposal: `no-exports-in-scripts` · sindresorhus/eslint-plugin-unicorn#2513 | Good First Issue