Rule Proposal: spread-spacing
See original GitHub issueI’d like to enforce spacing between the spread operator (...
) and its expression. I propose calling it spread-spacing
When does this rule warn? Please describe and show example code:
I envision it being configured with strings “always” and “never”.
With “never” (the default):
// Warns
myFunction(... args);
// Does not warn
myFunction(...args);
And vice-versa for “always”
Is this rule preventing an error or is it stylistic?
Stylistic
Why is this rule a candidate for inclusion instead of creating a custom rule?
It seems to fit with the other spacing rules we’ve included in core.
Are you willing to create the rule yourself?
Yes.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top Results From Across the Web
SEC Proposed Rules
SEC Proposed Rules · Regulation NMS: Minimum Pricing Increments, Access Fees, and Transparency of Better Priced Orders · File No: S7-30-22 · Comments...
Read more >rest-spread-spacing - ESLint - Pluggable JavaScript Linter
Rule Details. This rule aims to enforce consistent spacing between rest and spread operators and their expressions. The rule also supports object rest...
Read more >Proposed Rules - GovInfo
Commission has requested comment on a release proposing amendments to its rules under the Securities Act and. Exchange Act that would require.
Read more >LAND DEVELOPMENT CODE | Code of Ordinances | Venice, FL
A. The Land Development Regulations (LDR) are adopted to be consistent with and implement the City of Venice Comprehensive Plan as it may...
Read more >Tree and Landscaping Manual | Portland.gov
Tree and Landscaping Regulations of the Zoning Code ... A permit is required in the case where required landscaping is proposed without additional ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I propose this would apply to all forms of rest and spread operators (including
experimentalObjectRestSpread
). If people want more configurability in the future, it could be expanded with further options for the various cases. But, I don’t see much of a use case for enforcing/prohibiting spaces for certain kinds and not others (although I’m sure someone will want to eventually).So, maybe the name should be
rest-spread-spacing
.@kaicataldo much appreciated!