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

Fix support for ignored directories #369

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

pmoleri
Copy link
Contributor

@pmoleri pmoleri commented Aug 2, 2022

There was old support for ignoring directories in listing: gilbitron/Raneto-Core@d74a0e1
but it was crashing when attempting to use it.

This PR adds it to test content and fixes the crash.

@@ -33,7 +33,7 @@
"start_win": "set DEBUG=raneto&&node example/server.js",
"test": "npm run lint && mocha --reporter spec test/*.js",
"gulp": "gulp",
"lint": "./node_modules/.bin/eslint bin/* app/**/*.js example/**/*.js test/*.js gulpfile.js",
"lint": "eslint bin/* app/**/*.js example/**/*.js test/*.js gulpfile.js",
Copy link
Owner

Choose a reason for hiding this comment

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

Reason for this? not everyone has eslint installed globally.
Will NPM handle this in such a case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @ryanlelek , yes in my experience npm handles it nicely and I always use commands like this.

If I don't I get this error in Windows + git bash:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having some kind of dejavu: gilbitron/Raneto-Core#15 (comment) :D

Just wanted to clarify that it wouldn't try a global installation, what npm does is to prepend all bin commands in your PATH before running the script, which means that local eslint will be picked up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ryanlelek, I can undo this change if you prefer. However I think this is the right way to set it up, it always worked like a charm for me in cross platform setups.

image

https://docs.npmjs.com/cli/v8/using-npm/scripts#path

Copy link
Owner

Choose a reason for hiding this comment

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

It makes sense, thank you for the clarification.
In npm world, it adds its .bin/ to the search path. This may not(?) have always been the case which might be why I got in the habit.

@ryanlelek ryanlelek added pending Pending Close. Respond and removed pending Pending Close. Respond labels Aug 4, 2022
@ryanlelek
Copy link
Owner

Merging, thank you!

@ryanlelek ryanlelek merged commit bc16ee0 into ryanlelek:master Aug 9, 2022
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 this pull request may close these issues.

2 participants