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.

`no-unused-vars` and `prefer-template` rules conflict

See original GitHub issue

Having the following code:

    var someString = giveMeMyString();
    this.paragraph = `some article with $(someString)`;

I get no-unused-vars error. If I change it to:

    var someString = giveMeMyString();
    this.paragraph = 'some article with ' + someString;

I get prefer-template error. How it’s possible no one came across this? Am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chris-maccommented, Apr 15, 2016

Ah thank you! I blame context switching between Ruby, Bash and JS 😃

0reactions
ljharbcommented, Apr 15, 2016

@chris-mac can you provide the code in question? Note that the “correct syntax” refers to the backticks, NOT single/double quotes, surrounding the literal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint - Configuring "no-unused-vars" for TypeScript
Is there any way to configure the no-unused-vars rule to take these two cases into account? I'm not a fan of disabling the...
Read more >
eslint-config-adidas-es5 | Yarn - Package Manager
ESLint base configuration and rules for all JavaScript codebases ... Updated no-unused-vars config to match @typescript-eslint/no-unused-vars .
Read more >
vue/no-v-for-template-key-on-child
This rule reports the key of the <template v-for> placed on the child elements. ... Don't enable both rules together; they are conflicting....
Read more >
ESLint | Webdesign Advanced - Netlify
Prettier and ESLint have a few common rules that (may) conflict with each other; In the index page, ESLint doesn't work inside the...
Read more >
no-unused-vars - ESLint - Pluggable JavaScript Linter
Rule Details. This rule is aimed at eliminating unused variables, functions, and function parameters. A variable foo is considered to be used if...
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