Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #440
Closed
Open
Issue created Aug 14, 2016 by Administrator@rootContributor

ESLint warnings and errors ignored in npm run build

Created by: mjomble

To reproduce:

create-react-app cra-test
cd cra-test
echo foo() > src/index.js
npm start

Output:

Warning in ./src/index.js

E:\dev\cra-test\src\index.js
  1:1  warning  'foo' is not defined  no-undef

✖ 1 problem (0 errors, 1 warning)

But if you run npm run build:

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:
...

Tested with 0.2.1

The reason is explained here:

to handle all errors and warnings with the node.js API you need to test err, stats.errors and stats.warnings

stats.errors and stats.warnings are checked in start.js but build.js only checks for err.

I may be able to submit a PR for this if needed.

Assignee
Assign to
Time tracking