question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: Template tag spacing

See original GitHub issue

Please describe what the rule should do: Similar to func-call-spacing – it would enforce spacing between template tag and template literal.

What category of rule is this? (place an “X” next to just one item)

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

// correct with spacing required
const [user] = await sql `SELECT * FROM users WHERE id = ${id}`
ctx.body = {
  name: user.name,
  avatar: escape `/avatars/${user.id}.jpg`,
}

// correct with spacing disallowed
const [user] = await sql`SELECT * FROM users WHERE id = ${id}`
ctx.body = {
  name: user.name,
  avatar: escape`/avatars/${user.id}.jpg`,
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
not-an-aardvarkcommented, Jan 11, 2017

"always" and "never" sound good to me.

I think the default should be "never", since I’ve never seen anyone intentionally use a space here.

2reactions
kaicataldocommented, Dec 2, 2016

I’ll champion this. @phaux Is everything clear? Please let us know if you need any help with anything, either here in this issue or in our Gitter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatting Tips to Make Your Grant Proposal a Standout
Proposal guidelines usually stipulate the spacing between sentences, but not the spacing between paragraphs or between a table and the paragraph ...
Read more >
How to Format a Business Proposal (With Examples)
It gives the document a modern, accessible appearance. This effect can be achieved in many ways. Add (more) space between paragraphs and ...
Read more >
Rule proposal: vue/padding-line-between-blocks #855 - GitHub
Enforce empty lines between blocks ( template , script , style , and any other root ... Rule proposal: padding lines between tags...
Read more >
Technical proposal writing: Definition, formatting ... - PandaDoc
Vertical spacing: For increased readability of your entire proposal, format the first-level sections so they have extra space above and below.
Read more >
Guidelines for Writing Research Proposals and Dissertations
Use a 1-1/2 inch left margin (to allow sufficient space for binding the final copies) and one inch top (i.e., about one inch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found