Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow a few exceptions to the standard eslint rules #3

Merged
merged 3 commits into from
Aug 15, 2016

Conversation

MarshallOfSound
Copy link
Collaborator

This handles #2 by injecting an eslint disable rules comment at the top of all parsed files.

Fixes #2

This is just a POC but I think it's a nice solution to the problem


t.equal(results[0].message, "'foo' is defined but never used", 'finds errors')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test is no longer an "error" has we have disabled the no-unused-vars rule

@zeke
Copy link
Owner

zeke commented Aug 9, 2016

Wow, this is a nice lightweight technique. 👍

Are you up for adding a note to the README about these exceptions?

Also we'll have to use var instead of const because this module is a dependency of electron/electron, which still has to support node 0.10 because of GitHub Legacy CI Reasons™. (cc @haacked who is helping us resolve that)

@MarshallOfSound
Copy link
Collaborator Author

GitHub Legacy CI Reasons™

Lol 😆

Are you up for adding a note to the README about these exceptions?

Yup

Also we'll have to use var instead of const

Will do

@zeke
Copy link
Owner

zeke commented Aug 9, 2016

Dang another node 0.10 thing:

/home/travis/build/zeke/standard-markdown/index.js:18
    var ignoredBlock = `/* eslint-disable ${disabledRules.join(', ')} */
                       ^
SyntaxError: Unexpected token ILLEGAL

@MarshallOfSound
Copy link
Collaborator Author

@zeke It's been so long since I've used node 0.10 😆 All green now 👍

@zeke zeke merged commit d0ea84b into zeke:master Aug 15, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants