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

Added object-curly-spacing rule #38

Merged
merged 3 commits into from Oct 17, 2017
Merged

Conversation

aigoncharov
Copy link
Contributor

No description provided.

@blakeembrey
Copy link
Owner

If you'd like to regenerate the rule output file so the tests work, I'll be able to merge this. It's npm run test:gen and defined in the package.json file (

"test:gen": "GENERATE_ASSETS=true blue-tape test/index.js",
).

@aigoncharov
Copy link
Contributor Author

@blakeembrey, done!

ERROR: /rules/import-spacing.ts[1, 7]: A space is required after '{'
ERROR: /rules/import-spacing.ts[1, 22]: A space is required before '}'
ERROR: /rules/import-spacing.ts[2, 8]: A space is required after '{'
ERROR: /rules/import-spacing.ts[2, 17]: A space is required before '}'
Copy link
Owner

Choose a reason for hiding this comment

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

Seems like it's marking the same things as "missing whitespace" above it, we should look at de-duplicating that. Did you want to add any test cases to show this improves coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Done. Sorry for the delay

Copy link
Owner

Choose a reason for hiding this comment

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

No rush 😄 I'll look into seeing how I can de-duplicate the "missing whitespace" errors from above if you'd like. I'd prefer to avoid having the same error output twice, but with your added test case I see the extra value in the rule now - where it doesn't overlap with existing config!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Look forward to getting it merged!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried removing 'check-module' in whitespace rule, but it did not help. It seems like they overlap indeed, but not completely. object-curly-spacing rule does not have that much flexibility. I suggest we merge it as is.

Copy link
Owner

Choose a reason for hiding this comment

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

I haven't committed to removing it yet, just trying to figure out if I could. When I removed it, it seemed like the rules directly overlapped with each other. When you checked, did you notice why it didn't help? It may have been if you checked line/column numbers only - this rule is -1 off the previous whitespace warnings since it warned you to "add after }".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry. I figured you removed it there for some reason. I checked it again. It seems you're right. Object-curly-spacing covers for whitespace check-module.

Copy link
Owner

Choose a reason for hiding this comment

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

Great, I'll remove it. Just wanted to make sure we were on the same page 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there gonna be a release any time soon? Anxious to remove object-curly-spacing rule from my tslint.json

Copy link
Owner

Choose a reason for hiding this comment

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

The release would need to be a major release so I’d like to see if anything else has changed before I do that (maybe there’s other new rules to be added). However, I’m doing less open source than I used to, so that may mean a couple of weeks time unless someone else does it.

@blakeembrey blakeembrey merged commit b761827 into blakeembrey:master Oct 17, 2017
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.

None yet

2 participants