-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): add object-curly-spacing
rule
#2892
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
feat(eslint-plugin): add object-curly-spacing
rule
#2892
Conversation
Thanks for the PR, @mpsijm! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
Codecov Report
@@ Coverage Diff @@
## master #2892 +/- ##
==========================================
+ Coverage 92.78% 92.81% +0.03%
==========================================
Files 311 312 +1
Lines 10458 10508 +50
Branches 2954 2969 +15
==========================================
+ Hits 9703 9753 +50
Misses 348 348
Partials 407 407
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f020460
to
1a1f3a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for picking this back up!
object-curly-spacing
rule
Added new extended rule
object-curly-spacing
, thanks to @Kiikurage for the implementation in #1884.Besides cherry-picking the commit of #1884, I've resolved @bradzacher's comments on the old PR and added a bunch more tests (copied from https://github.com/eslint/eslint/blob/master/tests/lib/rules/object-curly-spacing.js). @bradzacher also left the following comment:
I tried to do this in mpsijm@5a4698e, but it made 10 tests fail. I didn't look too much into the details of the implementation as to see why, but I'm guessing it's because object type literals are more complicated than object expressions. If anyone is interested, you can compare the implementation to the original rule: https://github.com/eslint/eslint/blob/master/lib/rules/object-curly-spacing.js
Fixes #1784