Add a fixer for prefer-const
See original GitHub issueI 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:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#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).
Ok, I’ll start on a PR for this.