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

Allow formatter to receive string (path) to file exporting formatter function #247

Merged
merged 2 commits into from
Sep 19, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 17, 2018

This PR aims to address #246.

Thanks!

Incorporates changes from #239.

@MoOx
Copy link
Contributor

MoOx commented Sep 19, 2018

Thanks

@Timer
Copy link
Contributor Author

Timer commented Sep 20, 2018

Thank you!

@Timer Timer deleted the feature/formatter-path branch September 20, 2018 14:13
edmorley added a commit to neutrinojs/neutrino that referenced this pull request Sep 28, 2018
As of webpack-contrib/eslint-loader#247 `eslint-loader` now also
supports the formatter being specified as a string, rather then only
as a function.

Passing as a string:
* allows the formatter to work when using `thread-loader`, which has
  to serialize the loader options.
* means we no longer need to manually specify `__expression`.
@mysticatea
Copy link

I'd like to strongly recommend to not depend on internal files of ESLint package. It's not a part of public API, so it can be changed in any patch releases.

Use public API instead: https://eslint.org/docs/developer-guide/nodejs-api#clienginegetformatter

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.

None yet

3 participants