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

Improve error messages #13

Open
lukastaegert opened this issue Aug 30, 2017 · 1 comment
Open

Improve error messages #13

lukastaegert opened this issue Aug 30, 2017 · 1 comment

Comments

@lukastaegert
Copy link
Owner

Currently, the errors produced by eslint-plugin-tree-shaking may be accurate but also somewhat technical, i.e. "Could not determine side-effects of…".
Under this issue I want to collect ideas on how to improve this and give better feedback to the user.

@neal-codaio
Copy link
Contributor

I've been hunting down side effects in a large codebase. It's hard to get everything working. Adding lots of annotations isn't productive at this stage. What I really want is to identify the classes of problems to get an idea of what's going on. One technique I used is to add this to the error messages:

function generateIgnoreSuffix(module, filename) {
  return ' ' + JSON.stringify({'module': module, 'functions': [filename]});
}

Currently, it only works in some cases, but it's helpful in coming up with the list to ignore for the first pass and get an idea of how big the problems are and what are our next steps. It would be great to apply this to all error messages. It could be enabled with an option. While it's possible to go to the source line, it's hard if you are looking at hundreds of messages and want to aggregate them.

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