textlint rule to check if hexadecimal is the upper/lower case.
Default
The hexadecimal should be capitalized.
OK
0x0A
NG
0x0a
Install with npm:
npm install textlint-rule-hex-number
Via .textlintrc
(Recommended)
{
"rules": {
"hex-number": true
}
}
Via CLI
textlint --rule hex-number README.md
{
// capitalize or not
"capitalize": true
}
{
"rules": {
"hex-number": {
"capitalize": false
}
}
}
Before
Red is 0xFF0000. Blue is 0x0000FF.
After
textlint --fix
fixes this.
Red is 0xff0000. Blue is 0x0000ff.
Builds source codes for publish to the lib
folder. You can write ES2015+ source codes in src/
folder.
npm run build
Run test code in test
folder. Test textlint rule by
textlint-tester.
npm test
MIT © Takeshi Yaeda