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

feat(shebang): Add options to ignore unpublished files #172

Merged
merged 9 commits into from Feb 7, 2024

Conversation

scagood
Copy link

@scagood scagood commented Jan 26, 2024

This is a possible solution to #119 suggested by @piranna

@scagood
Copy link
Author

scagood commented Jan 26, 2024

X_OK: Flag indicating that the file can be executed by the calling process. This has no effect on Windows (will behave like fs.constants.F_OK).
https://nodejs.org/api/fs.html#file-access-constants

Dang it!

I could try to ignore the setting on windows 🤔
Not too sure what to do here 😢

@piranna
Copy link

piranna commented Jan 27, 2024

This is ignoring the shebang if the files are in .npmignore, isn't It?

@scagood
Copy link
Author

scagood commented Jan 27, 2024

This is ignoring the shebang if the files are in .npmignore, isn't It?

It does not, I can do that though!

@piranna
Copy link

piranna commented Jan 27, 2024

I think at least in Linux and macOS would solve the most of use cases.

@scagood
Copy link
Author

scagood commented Jan 27, 2024

Yeah, that makes sense. I like it!

@scagood scagood changed the title feat: Add shebangs to all ignored executable files feat: Ignore shebangs for all files not published Jan 27, 2024
@scagood
Copy link
Author

scagood commented Jan 27, 2024

I think that is a lot cleaner and quicker too 🤔

@piranna
Copy link

piranna commented Jan 27, 2024

I think that is a lot cleaner and quicker too 🤔

Yeah, maybe there would be some other corner cases, but that would be a huge filter anyway.

@aladdin-add
Copy link

the code LGTM, can we put it behind an option?

@scagood scagood linked an issue Feb 2, 2024 that may be closed by this pull request
@scagood
Copy link
Author

scagood commented Feb 2, 2024

I intend on adding both options this weekend!
Something like:

  • additionalExcutables: [ 'tests/**' ]
  • ignoreIgnoredFiles: true

@scagood scagood changed the title feat: Ignore shebangs for all files not published feat(shebang): Add options to ignore unpublished files Feb 6, 2024
@scagood scagood linked an issue Feb 6, 2024 that may be closed by this pull request
@scagood scagood linked an issue Feb 6, 2024 that may be closed by this pull request
Copy link

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit 5609abb into eslint-community:master Feb 7, 2024
17 checks passed
@scagood scagood deleted the ignored-shebang branch February 7, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants