https://github.com/textlint-rule/textlint-rule-footnote-order
textlint rule that sort footnote identifier(`[^1]`) order.
https://github.com/textlint-rule/textlint-rule-footnote-order
markdown textlintrule
Last synced: 2 months ago
JSON representation
textlint rule that sort footnote identifier(`[^1]`) order.
- Host: GitHub
- URL: https://github.com/textlint-rule/textlint-rule-footnote-order
- Owner: textlint-rule
- License: mit
- Created: 2019-06-07T15:50:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-07T15:28:35.000Z (about 3 years ago)
- Last Synced: 2025-04-23T01:17:02.368Z (2 months ago)
- Topics: markdown, textlintrule
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# textlint-rule-footnote-order [](https://travis-ci.org/textlint-rule/textlint-rule-footnote-order)
textlint rule that sort footnote identifier(`[^1]`) order.
This rule check that to use incremental number for footnote identifier.
- **Limitation:** This rule work only Markdown.
**OK**:
```
foo [^1]
bar [^2][^1]: foo is ...
[^2]: bar is ...
```**NG**:
```
foo [^foo]
bar [^bar][^foo]: foo is ...
[^bar]: bar is ...
```## Install
Install with [npm](https://www.npmjs.com/):
npm install textlint-rule-footnote-order
## Usage
Via `.textlintrc`(Recommended)
```json
{
"rules": {
"footnote-order": true
}
}
```Via CLI
```
textlint --rule footnote-order README.md
```## Options
- `startIndex`: `number`
- Default: `1`
- Start number of footnode identifier
- Example) `^1`, `^2`. `^3` ...```json
{
"rules": {
"footnote-order": {
"startIndex": 1
}
}
}
```## Changelog
See [Releases page](https://github.com/textlint-rule/textlint-rule-footnote-order/releases).
## Running tests
Install devDependencies and Run `npm test`:
npm i -d && npm test
## Contributing
Pull requests and stars are always welcome.
For bugs and feature requests, [please create an issue](https://github.com/textlint-rule/textlint-rule-footnote-order/issues).
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## Author
- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)## License
MIT © azu