Skip to content

Suppress unwanted warnings #1947

Closed
Closed

Description

@timse

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

Activity

  1. timse commented on Apr 7, 2017

    @timse
    Author

    followup from #1924 @Timer

  2. added this to the 1.0.0 milestone on Apr 8, 2017
  3. Timer commented on Apr 8, 2017

    @Timer
    Contributor

    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.
    We'll have to work out the details and wait on the webpack release anyway. 😄

  4. kellyrmilligan commented on May 10, 2017

    @kellyrmilligan
    Contributor

    man I need this! localForage gives the prebuilt file warning, so in CI it breaks. :(

  5. kellyrmilligan commented on May 10, 2017

    @kellyrmilligan
    Contributor

    is there any workaround to this ATM?

  6. FredrikNoren commented on May 10, 2017

    @FredrikNoren

    @kellyrmilligan This hack: CI=false yarn build (not sure what other implications setting CI to false has though)

  7. levrik commented on May 25, 2017

    @levrik
    Contributor

    @FredrikNoren This doesn't work for me... Do you have an idea why?

  8. gaearon commented on May 25, 2017

    @gaearon
    Contributor

    @levrik

    What warnings exactly are you trying to suppress? The ones in this issue don’t seem to fire with latest versions.

  9. levrik commented on May 25, 2017

    @levrik
    Contributor

    @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.

  10. levrik commented on May 25, 2017

    @levrik
    Contributor

    @FredrikNoren @gaearon Ok

    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.

  11. mileung commented on Jun 9, 2017

    @mileung

    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.

  12. midastouchprd commented on Jul 3, 2017

    @midastouchprd

    @mileung

    /* eslint-disable no-unused-vars*/

    at the top of your files

    should give you what you want

  13. gaearon commented on Jul 3, 2017

    @gaearon
    Contributor

    @mileung This warning is valuable for catching some very annoying mistakes though.

  14. mileung commented on Jul 3, 2017

    @mileung

    @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.

  15. gaearon commented on Jul 3, 2017

    @gaearon
    Contributor

    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.

  16. JReinhold commented on Aug 1, 2017

    @JReinhold

    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:

    ./~/ajv/lib/async.js
    96:20-33 Critical dependency: the request of a dependency is an expression
    
    ./~/ajv/lib/async.js
    119:15-28 Critical dependency: the request of a dependency is an expression
    
    ./~/ajv/lib/compile/index.js
    13:21-34 Critical dependency: the request of a dependency is an expression
    

    (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.

  17. missbruni commented on Aug 24, 2017

    @missbruni

    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 ?

  18. TSMMark commented on Nov 17, 2017

    @TSMMark

    React's deprecation warnings after an upgrade cause Capybara PhantomJS to fail builds on CI. My temporary workaround was settings js_errors: false. Terrible bandaid, but now warnings aren't blocking deploys.

    Now obviously the next step is to set js_errors: true and hunt down and fix every single warning. Fun

  19. gaearon commented on Jan 8, 2018

    @gaearon
    Contributor

    @isbdnt This doesn't solve anything for CRA users and is not relevant to this repository.

    @TSMMark This issue is about build-time warnings and has nothing to do with React (runtime) warnings.

  20. gaearon commented on Jan 8, 2018

    @gaearon
    Contributor

    Going to close this as stale. Please raise a new issue with more details if you're interested in this.

  21. locked and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions