Skip to content

fix: jshint works on Windows#295

Merged
ariporad merged 2 commits intoshelljs:masterfrom
nfischer:fix-run-tests
Jan 21, 2016
Merged

fix: jshint works on Windows#295
ariporad merged 2 commits intoshelljs:masterfrom
nfischer:fix-run-tests

Conversation

@nfischer
Copy link
Copy Markdown
Member

run-tests.js previously relied on shell wildcard expansion, and did not specify
full paths. This uses common.expand to handle globbing internally, and specifies
the full path, so jshint can find all the files.

This does not entirely fix run-tests, but this does fix the jshint portion, so we'll at least get it to process javascript files. A full fix would be much more intensive, since exec() can't start from the current working directory. So this is only a partial fix for #294.

Also, this adds in lint-checking the scripts/ folder (and fixes the lint errors I found!). Now the only significant folder this skips is the src/ folder (which I'm working on providing support for).

run-tests.js previously relied on shell wildcard expansion, and did not specify
full paths. This uses common.expand to handle globbing internally, and specifies
the full path, so jshint can find all the files.
@nfischer nfischer added fix Bug/defect, or a fix for such a problem medium priority Windows labels Jan 19, 2016
@nfischer
Copy link
Copy Markdown
Member Author

Update: I fixed the lint errors in src/, so now this will go through and do lint checking on src/*.js as well.

@nfischer
Copy link
Copy Markdown
Member Author

@ariporad is this safe to merge?

@ariporad
Copy link
Copy Markdown
Contributor

LGTM!

ariporad added a commit that referenced this pull request Jan 21, 2016
@ariporad ariporad merged commit 015d34f into shelljs:master Jan 21, 2016
@ariporad
Copy link
Copy Markdown
Contributor

@nfischer: This gave me an idea (if you like it, I'll open a separate issue): What if we wrote an ESLint plugin/preset for shelljs, which automatically included the needed globals. (Then we could switch the project itself to eslint).

@nfischer
Copy link
Copy Markdown
Member Author

@ariporad I don't have much experience with eslint. That sounds like it'd be useful though (since it can be somewhat annoying to declare in a comment which globals are used). I think this project relies on jshint partially because it uses shelljs as a dependency. So far, it seems fairly easy to stick with jshint, so I say we don't prioritize the switch too much.

@nfischer nfischer deleted the fix-run-tests branch January 28, 2016 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug/defect, or a fix for such a problem medium priority Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants