Closed
Bug 1383490
Opened 8 years ago
Closed 8 years ago
Template literals in Sync code seem malformed
Categories
(Firefox :: Sync, enhancement)
Tracking
()
RESOLVED
INVALID
People
(Reporter: nicolaso, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170722112649
Actual results:
Some regular strings in Sync code look like they should be template literals. i.e., it *looks* like we should replace double-quotes with backquotes:
http://searchfox.org/mozilla-central/search?q=%5E%5B%5E%60%5D%2B%3F%22%5B%5E%22%5D*%3F%5C%24%5C%7B&case=false®exp=true&path=services%2Fsync
Because they use regular quotes instead of backquotes, they are string literals. There is no substitution of `${...}`, which seems incorrect.
On a side note, eslint can check these kinds of mistakes for us if they occur again:
http://eslint.org/docs/rules/no-template-curly-in-string
| Reporter | ||
Updated•8 years ago
|
Component: Untriaged → Sync
Comment 1•8 years ago
|
||
Log.jsm also supports template-like matching, which is what is being used here. In many ways it is superior to real template strings, as the template formatting is only performed once the module knows the log message will be written somewhere.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•