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