pantor / ros-control-center

A web-based control center for ROS robots.
https://pantor.github.io/ros-control-center
BSD 3-Clause "New" or "Revised" License
265 stars 71 forks source link

Adding the eslint rules #16

Closed AlexisTM closed 7 years ago

AlexisTM commented 7 years ago

Using gulp returns errors due to JSLint configuration.

Adding the configuration (JSX & modules) remove the errors.

$ gulp
[11:48:33] Using gulpfile ~\Desktop\Workspace\Github\ros-control-center\gulpfile.js
[11:48:33] Starting 'js-lint'...
[11:48:34] Starting 'watch'...
[11:48:34] Finished 'watch' after 25 ms
[11:48:34]
C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\control\control.controller.js
  1:5  error  Parsing error: Unexpected token ros

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\helper\domains.service.js
  1:1  error  Parsing error: The keyword 'class' is reserved

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\helper\quaternions.service.js
  1:1  error  Parsing error: The keyword 'class' is reserved

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\navbar\navbar.directive.js
  5:15  error  Parsing error: Unexpected token (

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\parameters\parameters.directive.js
  6:15  error  Parsing error: Unexpected token (

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\services\service.directive.js
  6:15  error  Parsing error: Unexpected token (

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\settings\settings.controller.js
  1:1  error  Parsing error: The keyword 'class' is reserved

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\settings\settings.factory.js
  1:1  error  Parsing error: The keyword 'class' is reserved

C:\Users\paquesa\Desktop\Workspace\Github\ros-control-center\app\topics\topic.directive.js
  6:15  error  Parsing error: Unexpected token (

✖ 9 problems (9 errors, 0 warnings)

[11:48:34] 'js-lint' errored after 267 ms
[11:48:34] ESLintError in plugin 'gulp-eslint'
Message:
    Failed with 9 errors
pantor commented 7 years ago

I created an .eslintrc.json file, updated the linter rules and implemented them, so that no errors are shown. Thanks for pointing that out.