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

chore(build): fix eslint pattern #529

Merged
merged 2 commits into from
Jun 27, 2018
Merged

Conversation

dhruvdutt
Copy link
Member

What kind of change does this PR introduce?

Did you add tests for your changes?

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?

Other information

package.json Outdated
@@ -22,7 +22,7 @@
"bundler"
],
"scripts": {
"lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"{packages}/**/!(node_modules)/*.js\" ",
"lint": "eslint \"./bin/*.js\" \"./packages/**/!(node_modules)/*.js\" ",
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we ignore the test folder? It's currently in eslintignore.

Copy link
Contributor

@ematipico ematipico Jun 27, 2018

Choose a reason for hiding this comment

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

Why we don't want to lint the tests? Sounds odd to me

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. There is no reason to ignore the test. Fixed it.

@dhruvdutt dhruvdutt requested a review from ematipico June 27, 2018 08:13
@@ -1,5 +1,5 @@
**/__testfixtures__/*
coverage
test
test/binCases/errors/parse/index.js
Copy link
Member Author

Choose a reason for hiding this comment

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

This is needed because eslint-disable can't work on some files like:

2:1  error  Parsing error: Unexpected token }

Copy link
Contributor

Choose a reason for hiding this comment

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

But that's a SyntaxError. It would bomb an error anyway

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. This is error checking test. 😅

expect(stdout[5]).toContain("[failed]");
expect(stdout[5]).toContain("[1 error]");
expect(stdout[7]).toContain("ERROR in ./index.js");
expect(stdout[8]).toContain("Module parse failed:");

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification!

!function(e) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This should be ignored from linters, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Looks good to me! So now we have eslint properly set :)

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

Successfully merging this pull request may close these issues.

3 participants