codeamp / panel

CodeAmp Web Application. Built with React.js, GraphQL and Material-UI.
12 stars 7 forks source link

Cleanup warnings #159

Closed aballman closed 6 years ago

aballman commented 6 years ago

There are a number of outstanding panel warnings. When building on CircleCI, the environment variable CI=true is set, which makes npm treat warnings as errors. This means that until they are resolved, all CI builds will fail.

!/bin/bash -eo pipefail
npm run-script build
npm info it worked if it ends with ok
npm info using npm@4.2.0
npm info using node@v7.10.1
npm info lifecycle panel@0.1.0~prebuild: panel@0.1.0
npm info lifecycle panel@0.1.0~build: panel@0.1.0

> panel@0.1.0 build /home/circleci/repo
> react-scripts build

Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

./src/lib/apollo.js
  Line 4:  'defaultDataIdFromObject' is defined but never used  no-unused-vars
  Line 7:  '_' is defined but never used                        no-unused-vars

./src/components/Admin/Secrets/index.js
  Line 232:  Duplicate key 'isSecret'  no-dupe-keys

./src/components/Admin/Projects/index.js
  Line 8:    'Drawer' is defined but never used                 no-unused-vars
  Line 10:   'AppBar' is defined but never used                 no-unused-vars
  Line 12:   'Dialog' is defined but never used                 no-unused-vars
  Line 13:   'DialogActions' is defined but never used          no-unused-vars
  Line 14:   'DialogContent' is defined but never used          no-unused-vars
  Line 15:   'DialogContentText' is defined but never used      no-unused-vars
  Line 16:   'DialogTitle' is defined but never used            no-unused-vars
  Line 18:   'InputField' is defined but never used             no-unused-vars
  Line 24:   'validatorjs' is defined but never used            no-unused-vars
  Line 25:   'MobxReactForm' is defined but never used          no-unused-vars
  Line 28:   'check' is defined but never used                  no-unused-vars
  Line 232:  'projects' is assigned a value but never used      no-unused-vars
  Line 237:  Expected to return a value in function             array-callback-return
  Line 243:  Expected to return a value in function             array-callback-return
  Line 268:  Expected to return a value in function             array-callback-return
  Line 312:  Expected to return a value in function             array-callback-return
  Line 314:  Expected to return a value in function             array-callback-return
  Line 319:  Expected a default case                            default-case
  Line 473:  Expected a default case                            default-case
  Line 485:  Expected to return a value in function             array-callback-return
  Line 487:  Expected a default case                            default-case
  Line 550:  Expected to return a value at the end of function  array-callback-return

./src/components/Project/Releases/index.js
  Line 52:   Unreachable code         no-unreachable
  Line 55:   Unreachable code         no-unreachable
  Line 58:   Unreachable code         no-unreachable
  Line 589:  Expected a default case  default-case

npm info lifecycle panel@0.1.0~build: Failed to exec build script
npm ERR! Linux 4.4.0-124-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "build"
npm ERR! node v7.10.1
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! panel@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the panel@0.1.0 build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the panel package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs panel
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls panel
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/circleci/.npm/_logs/2018-05-22T04_15_49_270Z-debug.log
Exited with code 1
drshrey commented 6 years ago

I can address this by making a PR exclusively resolving all warnings. Is there anything else on the application level that would cause Circle to fail?

aballman commented 6 years ago

Not that I'm aware of. These are coming out of npm run-script build with CI=true and they're the only things in the way of a successful build afaik.

When you make your PR put 'Fixes #159' at the bottom of it and it should tie this issue to your PR.