Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1364 - add specific paths to js lint #1365

Merged
merged 3 commits into from
Feb 28, 2017
Merged

Fixes #1364 - add specific paths to js lint #1365

merged 3 commits into from
Feb 28, 2017

Conversation

zoepage
Copy link
Member

@zoepage zoepage commented Feb 27, 2017

#1364

Adding path to npm script to lint just specific js files.

  • Gruntfile.js
  • tests/
  • grunt-tasks/
  • webcompat/static/js/lib/

r? @miketaylr

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but it means grunt eslint and npm run lint do different things now:

https://github.com/webcompat/webcompat.com/blob/master/grunt-tasks/eslint.js

We run grunt from npm run build, which we use in our .travis.yml file:

https://github.com/webcompat/webcompat.com/blob/master/.travis.yml#L52-L53

So we can either make grunt eslint task match these args, OR remove the grunt eslint task entirely and add npm run lint to Travis (since removing it from grunt means it wont get invoked in npm run build).

@zoepage
Copy link
Member Author

zoepage commented Feb 27, 2017

Intention for removing the eslint part of grunt was to start being less dependent on grunt as we'll get rid of it soon-ish. So, I'll add the task to the travis.yml.

(Will do a test push, so make sure it works and fails.)

--- edit ---
@miketaylr linter fires up the error.

@miketaylr
Copy link
Member

Intention for removing the eslint part of grunt was to start being less dependent on grunt as we'll get rid of it soon-ish.

So will you remove that Grunt task in this PR?

@zoepage
Copy link
Member Author

zoepage commented Feb 27, 2017

not the build as we'd need to move to webpack for that. Just the grunt task for the linter. small steps.

or do you think about it otherwise?

@zoepage zoepage mentioned this pull request Feb 27, 2017
9 tasks
@miketaylr
Copy link
Member

I guess I don't like the idea of having two eslint commands that are linting different sets of files, even temporarily (a few months?).

Removing the grunt:eslint task seems like a simple way to fix that in this PR that w/o requiring a full webpack re-write.

Just remove https://github.com/webcompat/webcompat.com/blob/master/grunt-tasks/eslint.js, and remove the task from https://github.com/webcompat/webcompat.com/blob/master/Gruntfile.js#L26 and https://github.com/webcompat/webcompat.com/blob/master/Gruntfile.js#L31.

And

"grunt-eslint": "^19.0.0",
I guess.

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants