-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Suppress unwanted warnings #1947
Comments
Perfect, we'll try to take a look at this soon, probably after the 0.10 release which should be by the end of the month. |
man I need this! localForage gives the prebuilt file warning, so in CI it breaks. :( |
is there any workaround to this ATM? |
@kellyrmilligan This hack: |
@FredrikNoren This doesn't work for me... Do you have an idea why? |
What warnings exactly are you trying to suppress? The ones in this issue don’t seem to fire with latest versions. |
@gaearon I want to suppress some linting warnings that are preventing the production deployment or... I don't really want to suppress them. I only want that they don't block the deployment. |
unset CI
yarn build
CI=true did the trick. Seems like it's only checking for the existence of the CI variable and not for the content. |
Would be nice to suppress warnings like "warning 'variable' is assigned a value but never used no-unused-vars". I usually just duplicate a template folder to create a new component and they import things that haven't been used yet, so I get this warning a lot. |
at the top of your files should give you what you want |
@mileung This warning is valuable for catching some very annoying mistakes though. |
@gaearon Probably, but I don't think importing something or making a new variable would cause anything to break; at least not in my current project. |
It’s sometimes a sign of a mistake in logic. For example if you read some parameter but forget to use it. So it might not “break” things but might indicate that the code doesn’t do what you think it does. As for imports, it is valuable for catching unused imports that bloat the bundle. For example if you import a whole library in the main bundle but it’s only necessary in code split chunks. |
I support this issue, it is especially relevant when getting warnings caused by other dependencies way down the dependency-tree. We can't find a way to get around this warning:
(the specific warning type is discussed in other issues, this was just to give an example that would support the issue of suppressing warnings). So #1947 (comment) was a life safer for us. |
I know webpack has added a warning filter to their config but this does not solve our problem when getting warnings from other dependencies and not having access to configuration. Any solutions ? |
React's deprecation warnings after an upgrade cause Capybara PhantomJS to fail builds on CI. My temporary workaround was settings Now obviously the next step is to set |
Going to close this as stale. Please raise a new issue with more details if you're interested in this. |
As of webpack/webpack#4381 webpack will (once released) allow to suppress warnings as requested here: webpack/webpack#4263 .
Happy to help out with a PR, if you can specify what is wanted, wanted to be suppressed
The text was updated successfully, but these errors were encountered: