textlint-rule-ng-regexp
v0.1.0
Published
## Install
Downloads
2
Readme
textlint-rule-ng-regexp
Install
Install with npm:
npm install textlint-rule-ng-regexp
Usage
Via .textlintrc
(Recommended)
{
"rules": {
"ng-regexp": {
"words": [
{
// first item is RegExp pattern
// second is RegExp flag: "i", "g", "m". Default: "g".
// Any option is added "g" flag
"pattern": ["hoge"] // => new RegExp('hoge', 'g')
},
{
"pattern": ["fuga", "i"] // => new RegExp('fuga', 'ig')
},
{
"pattern": ["piyo", "i"], // => new RegExp('piyo', 'ig')
"exclude": ["piyopiyo"], // => new RegExp('piyopiyo', 'g')
"correct": "ponyo"
}
]
}
}
}
Via CLI
textlint --rule ng-regexp README.md
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 ©