4 ms·
>I think running eslint --fix will even change your "let"s to "const"s where appropriate, but don't quote me on that. Yep, this is the relevant rule - http://e
by rkwz 10y ago
>I think running eslint --fix will even change your "let"s to "const"s where appropriate, but don't quote me on that.
Yep, this is the relevant rule - http://eslint.org/docs/rules/no-var http://eslint.org/docs/rules/no-var
Though it just replaces all var with let. I expected it to intelligently use either const or let depending on how the variable is used ¯\_(ツ)_/¯
- Zirro 10y agoYou're looking for: http://eslint.org/docs/rules/prefer-const http://eslint.org/docs/rules/prefer-const It does exactly what you describe :)