Skip to content

Commit

Permalink
Improved 'bad' example for the Strings section (#25349)
Browse files Browse the repository at this point in the history
* Improved 'bad' example for the Strings section

Bad and good examples are the same. I've added the double quotes to bad example as intended to show the difference between what is bad and what is a good example for using strings in the coding standards for the Gutenberg editor.

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Zebulan Stanphill <[email protected]>

Co-authored-by: Greg Ziółkowski <[email protected]>
Co-authored-by: Zebulan Stanphill <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2020
1 parent 7f7f777 commit 91965a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/contributors/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ String literals should be declared with single-quotes _unless_ the string itself

In general, avoid backslash-escaping quotes:

<!-- prettier-ignore -->
```js
// Bad:
const name = 'Matt';
const name = "Matt";
// Good:
const name = 'Matt';

Expand Down

0 comments on commit 91965a6

Please sign in to comment.