Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

pass down source map if it exists #70

Merged
merged 1 commit into from
Jan 2, 2016
Merged

Conversation

yyx990803
Copy link
Contributor

This PR's primary purpose is passing down the input source map to the next chained loader if it exists. Although not a common use case, this is necessary if the code being linted was transformed by another loader before passed to eslint-loader. (In specific, with vue-loader which extracts the JavaScript from a *.vue file then passes it through eslint-loader)

I also took the liberty to simplify the callback usage: since the lint function is in fact purely synchronous, there is no need to check for this.async() - simply using this.callback() will suffice.

Regarding the failed test

When running the test locally, there is one autofix-related test failing before this patch is applied, likely due to ESLint updates since the last release. The post-patch test result is exactly the same, so the failed test should have nothing to do with this patch.

@MoOx
Copy link
Contributor

MoOx commented Jan 2, 2016

Looks good.

Ok for the sync/async thing (when I coded this - my first loader - I was like "I don't know what I am doing, so I trust you since you seems pretty confident about that change).

Will fix the issue in master (after diner ^^) and then merge and release this as a minor release.

MoOx added a commit that referenced this pull request Jan 2, 2016
pass down source map if it exists
@MoOx MoOx merged commit 5cb6c1e into webpack-contrib:master Jan 2, 2016
@MoOx
Copy link
Contributor

MoOx commented Jan 2, 2016

Released as 1.2.0. Thanks for your contribution @yyx990803!

@yyx990803
Copy link
Contributor Author

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants