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

.associateExtWithParser() instead of skipUnsupported #13

Open
ecarlisle opened this issue Jan 15, 2018 · 4 comments
Open

.associateExtWithParser() instead of skipUnsupported #13

ecarlisle opened this issue Jan 15, 2018 · 4 comments

Comments

@ecarlisle
Copy link

ecarlisle commented Jan 15, 2018

First, thank you for this plugin! This has been very useful for me!

Leasot raises an exception when it encounters a file extension it does not support. Therefore the skipUnsupported option in todo-webpack-plugin doesn't add the ability to parse files not supported by leasot.

https://github.com/pgilad/leasot/blob/9af95b823cffa0b43289a3c9341158a1aef74554/lib/parsers.js#L98-L100

However there is the .associateExtWithParser(parsers) API that will allow explicit association of an unsupported like extension with a bundled parser.

https://github.com/pgilad/leasot#associateextwithparserparsers

I have files with unsupported extensions that could be associated with a bundled parser. I'd be happy to fork an submit a PR where the .associateExtWithParser(parsers) API was extended into todo-webpack-plugin.

How does this sound?

@mikeerickson
Copy link
Owner

@ecarlisle Thank you for the request, I will allocate some time to get it added. If you would like to PR it, that would be much appreciated 👍

@ecarlisle
Copy link
Author

Great, thanks! Happy to help! This may be another issue, but should the skipUnsupported option be removed if leasot does not support it?

@ecarlisle
Copy link
Author

Actually, we may want to instead plan to deprecate. If the skipUnsupported option is used, I can output a deprecation warning. I can also include that in the README.md docs as well.

@mikeerickson
Copy link
Owner

My preference would be to place deprecation warning in README.md and give enough warning for the next major release (will have minor release with the above mentioned feature)

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

No branches or pull requests

2 participants