meanjs / mean

MEAN.JS - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js -
http://meanjs.org
MIT License
4.87k stars 1.98k forks source link

Lint error when building assets #1360

Open fauria opened 8 years ago

fauria commented 8 years ago

When running gulp build or grunt build, trailing commas are added to config/assets/production.js resulting in:

...
Running "eslint:target" (eslint) task

/Directory/config/assets/production.js
  11:65  error  Unexpected trailing comma  comma-dangle
  28:60  error  Unexpected trailing comma  comma-dangle

✖ 2 problems (2 errors, 0 warnings)

Warning: Task "eslint:target" failed. Use --force to continue.

Edit: Only gulp build adds those commas, grunt buildworks fine.

shanavas786 commented 8 years ago

Its because grunt build just use the default assets configurations and doesn't create one based on bower.json (No wiredep task. Porbably a bug :) ).

I have worked on removing trailing comma using gulp-trailing-comma. But the npm package is not up-to-date friskfly/gulp-trailing-comma#2. I will create a PR once it is updated.

ilanbiala commented 8 years ago

Is there still work that needs to be done here?

shanavas786 commented 8 years ago

Since there is no update on friskfly/gulp-trailing-comma#2 , i have created a package and plugins for gulp and grunt for removing trailing commas.

ilanbiala commented 8 years ago

@lirantal can you take a look at the PR?

lirantal commented 8 years ago

Re-opening this issue as it is still relevant, waiting for @shanavas786 PR.

shanavas786 commented 8 years ago

I have started #1412 . @lirantal Please have a look.

mleanos commented 8 years ago

@shanavas786 @lirantal Moving to backlog since there hasn't been a successful PR that solves this issue.