Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n/shebang has wrong entry for report node #85

Closed
Zamiell opened this issue Feb 3, 2023 · 2 comments · Fixed by #172
Closed

n/shebang has wrong entry for report node #85

Zamiell opened this issue Feb 3, 2023 · 2 comments · Fixed by #172

Comments

@Zamiell
Copy link

Zamiell commented Feb 3, 2023

The bug is here:

https://github.com/eslint-community/eslint-plugin-n/blob/master/lib/rules/shebang.js#L164

Instead of selecting node, we need to select only the first line of the file.
In other words, when in VSCode:

  • When the shebang is there and it is not supposed to be, we want the yellow squiggly line to appear only over the shebang, not over the entire file.
  • When the shebang is missing and it is supposed to be there, we want the yellow squiggly line to appear on the first line, not over the entire file.
@aladdin-add
Copy link

yes, it's not a good UX to highlight the entire file. are you willing to submit a PR? :)

@Zamiell
Copy link
Author

Zamiell commented Feb 7, 2023

Sorry, I don't have time.

scagood added a commit to scagood/eslint-plugin-n that referenced this issue Feb 6, 2024
@scagood scagood linked a pull request Feb 6, 2024 that will close this issue
aladdin-add pushed a commit that referenced this issue Feb 7, 2024
* feat: Add shebangs to all ignored executable files

* chore: Add names to shebang tests

* fix: Ignore shebangs for all files not published

* feat(shebang): Add "ignoreUnpublished" option

* chore: Actually ignore test fixtures

* chore: Remove import-maps module disable

* feat(shebang): Add "additionalExecutables" option

* docs(shebang): Add two new options to docs

* chore(shebang): Only report the first line #85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants