mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-08-17 08:11:00 +03:00
763 B
763 B
Style Guide
In addition, to VS Code's coding guidelines, please adhere to the following:
-
Use
for ... of
whenever possibleRationale:
for ... of
is awesome. It's more readable than any other variant. -
Do not use
any
except when necessaryRationale: The language is called TypeScript, not UntypedScript. 😉 Static typing is wonderful. It catches bugs and improves readability. We should strive to use it as much as possible.
-
Use
const
wherever possible.Rationale: Instead of reading
const
as "constant value," read it as "single assignment." Yes, it means "constant value" in other programming languages, but it's a little different in JavaScript.