Error unexpected string concatenation prefer template



prefer-template doesn’t consider unary expressions in string concat as warning #3589

Comments

dashed commented Aug 30, 2015

prefer-template doesn’t consider unary expressions in string concat as warning.

It can be rewritten as the following; but prefer-template doesn’t emit a warning:

The text was updated successfully, but these errors were encountered:

eslintbot commented Aug 30, 2015

Thanks for the issue! We get a lot of issues, so this message is automatically posted to each one to help you check that you’ve included all of the information we need to help you.

Reporting a bug? Please be sure to include:

  1. The version of ESLint you are using (run eslint -v )
  2. The source code that caused the problem
  3. The configuration you’re using (for the rule or your entire config file)
  4. The actual ESLint output complete with line numbers

Requesting a new rule? Please be sure to include:

  1. The use case for the rule — what is it trying to prevent or flag?
  2. Whether the rule is trying to prevent an error or is purely stylistic
  3. Why you believe this rule is generic enough to be included

Requesting a feature? Please be sure to include:

  1. The problem you want to solve (don’t mention the solution)
  2. Your take on the correct solution to problem

Including this information in your issue helps us to triage it and get you a response as quickly as possible.

Источник

Prefer-template multiline #3507

Comments

Cellule commented Aug 24, 2015

Sometimes we break string in mulitple lines for lisibility like

The rule warns us to use template string when this is not needing and defeats the purpose.
Right now, there is a work around to add 2 template strings like

But I don’t know if this is something we want/should keep. see #3506

The text was updated successfully, but these errors were encountered:

Читайте также:  Вылазит при запуске exception

eslintbot commented Aug 24, 2015

Thanks for the issue! We get a lot of issues, so this message is automatically posted to each one to help you check that you’ve included all of the information we need to help you.

Reporting a bug? Please be sure to include:

  1. The version of ESLint you are using (run eslint -v )
  2. The source code that caused the problem
  3. The configuration you’re using (for the rule or your entire config file)
  4. The actual ESLint output complete with line numbers

Requesting a new rule? Please be sure to include:

  1. The use case for the rule — what is it trying to prevent or flag?
  2. Whether the rule is trying to prevent an error or is purely stylistic
  3. Why you believe this rule is generic enough to be included

Requesting a feature? Please be sure to include:

  1. The problem you want to solve (don’t mention the solution)
  2. Your take on the correct solution to problem

Including this information in your issue helps us to triage it and get you a response as quickly as possible.

Источник

Fix all out-of-the-box ESLint errors #2157

Comments

samlasalle commented Aug 17, 2016 •

I have installed the angular-fullstack generator as per the instructions however I am getting a large amount of errors, most of them telling me that ‘angular’ is not defined, or that the expected indentation doesn’t match the generated indentation.

I have previously gotten this working on a different EC2 instance with none of these issues and I have no idea what I’ve done differently.

I can still enter the URL on my browser and the title is returned to that tab, and in the CLI where gulp serve is running it shows three GET requests with code 200, however no pages are being served. I am unsure what to do.

Читайте также:  Sdl error что делать

Attached is my output from gulp serve:

  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.0.1
Node 6.2.2
npm 3.9.5
Operating System Ubuntu 14.04
Item Answer
Transpiler Babel
Markup HTML / Pug
CSS CSS / LESS / SCSS / Stylus
Router ui-router
Client Tests Jasmine / Mocha
DB MongoDB
Auth Y

The text was updated successfully, but these errors were encountered:

Источник

Rule «no-useless-concat» reports false positive #3575

Comments

steffenweber commented Aug 29, 2015

If I’m not mistaken then this concatenation is not useless because number is not a string.

The text was updated successfully, but these errors were encountered:

eslintbot commented Aug 29, 2015

Thanks for the issue! We get a lot of issues, so this message is automatically posted to each one to help you check that you’ve included all of the information we need to help you.

Reporting a bug? Please be sure to include:

  1. The version of ESLint you are using (run eslint -v )
  2. The source code that caused the problem
  3. The configuration you’re using (for the rule or your entire config file)
  4. The actual ESLint output complete with line numbers

Requesting a new rule? Please be sure to include:

  1. The use case for the rule — what is it trying to prevent or flag?
  2. Whether the rule is trying to prevent an error or is purely stylistic
  3. Why you believe this rule is generic enough to be included

Requesting a feature? Please be sure to include:

  1. The problem you want to solve (don’t mention the solution)
  2. Your take on the correct solution to problem

Including this information in your issue helps us to triage it and get you a response as quickly as possible.

Источник

Quotes Refuses to Honor es6 Templates #7273

Comments

joshrhoades commented Sep 28, 2016 •

Ok, trolled through similar issues, and they all seem to end up being solved with the addition of allowTemplateLiterals rule for quotes , but that isn’t working for me and I think I’m about out of options or missing something so blatantly obvious that I will literally mock a kangaroo just to cause him to punch me, so here we are typing things into the webernets as a last-ditch effort.

It seems as perhaps there is some Bermudian Traingulan (what, yeah I said it) thing where a confluence of rules are combined to make one of the pieces tip over. That or I am missing something ridiculous despite my efforts, or perhaps there is a true issue lurking.

The code itself is fine, it executes properly with no errors, nothing is off in that sense.

This happens with single or double , and whether or not I include the props for allowEscape or allowTemplateLiterals in any combination, including omitting them.

If I run only the recommended rules, no such errors are reported, though that shouldn’t be surprising.

Tell us about your environment

  • ESLint Version: @3.6.0 (via rollup-plugin-eslint @3.0.0)
  • Node Version: @5.6.0
  • npm Version: @3.10.8

What parser (default, Babel-ESLint, etc.) are you using?
Default

Please show your full configuration: eslintrc.json

What did you do? Please include the actual source code causing the issue.

Additionally, in another file, this perfectly valid template string:

Reports this linter error:

What did you expect to happen?
Shouldn’t have seen linter errors.

What actually happened? Please include the actual, raw output from ESLint.
No other errors are reported for these lines or files.

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью
toolgir.ru
Adblock
detector