Rule for spaces around "=" character
See original GitHub issueI looked through the available rules but I can’t seem to find how to enforce having spaces around a =
character.
This should give a warning:
const my_object={key: 'value'};
This should not give a warning and should be considered valid:
const my_object = {key: 'value'};
Is there already a rule to enforce this?
Issue Analytics
- State:
- Created 8 years ago
- Comments:22 (21 by maintainers)
Top Results From Across the Web
Space (punctuation) - Wikipedia
In writing, a space ( ) is a blank area that separates words, sentences, syllables (in syllabification) and other written or printed glyphs...
Read more >How to make letter spacing css rule add space around ...
In css letter-spacing rule, the rule adds space after the character. Now I want to make the space to surround the character instead....
Read more >Formatting - Coding Style - Read the Docs
Each line of text in your code should be at most 80 characters long. ... NO spaces around the . and -> structure...
Read more >Whitespace · Styleguide JavaScript
Indentation Character · Before Blocks · Around Keywords · Infix Operator Spacing · Newline · Chains · After Blocks · Padded Blocks.
Read more >Rules of Punctuation and Spacing - The Classroom
Some special characters do not require a space between them and the word that follows, while others do. For example, a number sign...
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 Free
Top 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
@IanVS - I think it was automatic and it kind of addresses the original issue since
space-infix-ops
covers that case already.@ilyavolodin did you mean to close this issue from https://github.com/eslint/eslint/commit/ba818eee0fd69a50abe6289ae27b7ae4248c733d? It seems like maybe that should have been a
(refs #2399)
.