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.

Add a fixer for prefer-const

See original GitHub issue

I would like to add a fixer for the prefer-const rule. It seems like this should be pretty easy to do; the tricky part is figuring out that a variable should be const instead of let, but that’s already implemented. I’ll start on a PR after getting confirmation that the team would be amenable to this.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Jun 18, 2016

#5310 wasn’t merged, so we need something new.

Rules may fix only some problems, it is not required that they fix all problems they find (and in fact, we explicitly do not guarantee fixes to be applied).

0reactions
NickHeinercommented, Jun 20, 2016

Ok, I’ll start on a PR for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

prefer-const - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
prefer-const - Rule
“any” (default) - If any variable in destructuring can be const, this rule warns for those variables. “all” - Only warns if all...
Read more >
Dart: prefer constant constructors - flutter
There are reasons why const constructors are preferred and it's easy to fix by putting "const" in front of the Text(...). – novas1r1....
Read more >
Flutter Dart: Prefer const with constant constructors ... - YouTube
Are you getting the following errors in VSCode? 1. Prefer const with constant constructors.dart. (prefer_const_constructors)2.
Read more >
Flutter 2022: Prefer const with constructors problem solution in ...
Assalam o Alaikum Students I hope you're well, today's our video I gonna tell you that how to solve flutter: Prefer const with...
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