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

Enforce spaces in parentheses. #5666

Closed
joshuapinter opened this issue Mar 12, 2018 · 3 comments · Fixed by #5672
Closed

Enforce spaces in parentheses. #5666

joshuapinter opened this issue Mar 12, 2018 · 3 comments · Fixed by #5672

Comments

@joshuapinter
Copy link
Contributor

Is there any way to enforce spaces in parentheses? It looks like the only option is to ensure there are no spaces.

And, if not, is this something that you would consider merging in as an config option if I create a PR for it?

For support, we use ESLint for our mobile application and it supports this as a configuration, as can be seen here.

Thanks!

@Drenmi
Copy link
Collaborator

Drenmi commented Mar 12, 2018

Is there any way to enforce spaces in parentheses?

I don't believe there is.

And, if not, is this something that you would consider merging in as an config option if I create a PR for it?

Yes. Would be nice to see a PR for a configuration option on SpaceInsideParens cop. 👍

@joshuapinter
Copy link
Contributor Author

Excellent, thanks. Glad you're open to it. I'll put this on the weekend list to get implemented.

It'll be nice to have our company's style guide for both Ruby and JavaScript consistent.

@joshuapinter
Copy link
Contributor Author

I ended up getting to this quicker than I thought. I added an EnforcedStyle option to enforce spaces in parentheses. Tests as well. Everything is working great on our projects.

You can see the Pull Request here: #5672

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

Successfully merging a pull request may close this issue.

2 participants