textlint-rule-ng-regexp

0.1.0 • Public • Published

textlint-rule-ng-regexp

CircleCI Greenkeeper badge

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 ©

Readme

Keywords

Package Sidebar

Install

npm i textlint-rule-ng-regexp

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

12.3 kB

Total Files

5

Last publish

Collaborators

  • noliaki