Proofdict is a collection of dictionary.
See website for using it.
# `id` is unique string
id: 01BQ92YYBEFBXEHH8T8HC8RCRD
# `description` is a short comment
description: 'Reference https://www.ecma-international.org/publications/standards/Ecma-262.htm'
# `expected` is expected result
# `$1` ... `$9` reference `patterns`'s capture word
# This is same behavior with RegExp https://github.com/zeeshanu/learn-regex
expected: ECMAScript $1
# `patterns` are match string or RegExp
# RegExp should be started with `/` and be ended with `/`
# Also, can use `()` for capturing
patterns:
- /ECMAScript([0-9]+)/i
- /ECMA Script([0-9]+)/i
# `allows` define ignore patterns
# If `allows` pattern are matched, just ignore it
allows:
- ECMASCRIPT1
# `specs` are test cases
# `specs[n].from` is actual word
# `specs[n].to` is expected word that is replaced result
specs:
- from: ECMASCRIPT5
to: ECMAScript 5
- from: ECMASCRIPT1
to: ECMASCRIPT1 # because "ECMASCRIPT1" is allowed
# `tags` are keywords
# Some `tag` means special meaning
tags:
- noun
- JavaScript
This format is similar with prh. Proofdict includes some additional features.
allows
has defined typical patterns.
{{COMBINATION_WORD}}
: ignore combination word likenode-webkit
When pattern
is webkit
and set allows
to {{COMBINATION_WORD}}
, ignore /-webkit/
and webkit-
.
As a result, this pattern match webkit
, but does not match node-webkit
.
id: JavaScript
description: 'JavaScript is not Java Script'
expected: JavaScript
patterns:
- /javascript/i
- /Java Script/i
allows:
- {{COMBINATION_WORD}} # allow "x-javascript"
specs:
- from: javascript
to: JavaScript
- from: java script
to: JavaScript
- from: Java script
to: JavaScript
- from: x-javascript
to: x-javascript
tags:
- noun
- JavaScript
This repository is monorepo.
This repository includes following modules.
- @proofdict/tester
- core logic
- @proofdict/tester-cli
- run test for dictionary from CLI
- @proofdict/textlint-rule-proofdict
- textlint rule for proofdict's dictionary
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu