prettier-plugin-motoko
prettier-plugin-motoko copied to clipboard
Format numbers for better readability
Enforce the [style guide recommendation](https://internetcomputer.org/docs/current/developer-docs/build/cdks/motoko-dfinity/style/#miscellaneous] for numbers:
Group by 3 digits in decimal numbers and by 4 in hexadecimal notation.
In addition, add leading zeros in hex notation to be 2 digits or a multiple of 4 digits.
Examples:
1000000would be formatted as1_000_0000x2would be formatted as0x020x123456would be formatted as0x0012_345612_34_56would be formatted as123_4560.123456would be formatted as0.123_456