remark-lint-checkbox-content-indent
Advanced tools
Comparing version 1.0.2 to 1.0.3
10
index.js
@@ -7,3 +7,3 @@ /** | ||
* @fileoverview | ||
* Warn when list item checkboxes are followed by too much white-space. | ||
* Warn when list item checkboxes are followed by too much whitespace. | ||
* | ||
@@ -60,3 +60,3 @@ * @example {"name": "valid.md"} | ||
/* Exit early for items without checkbox. */ | ||
// Exit early for items without checkbox. | ||
if (typeof node.checked !== 'boolean' || generated(node)) { | ||
@@ -68,3 +68,4 @@ return | ||
/* istanbul ignore next - hard to test, couldn’t find a case. */ | ||
final = (node.children.length ? start(node.children[0]) : end(node)).offset | ||
final = (node.children.length === 0 ? end(node) : start(node.children[0])) | ||
.offset | ||
@@ -75,4 +76,3 @@ while (/[^\S\n]/.test(contents.charAt(final))) { | ||
/* For a checkbox to be parsed, it must be followed | ||
* by a white space. */ | ||
// For a checkbox to be parsed, it must be followed by a whitespace. | ||
value = contents.slice(initial, final) | ||
@@ -79,0 +79,0 @@ value = value.slice(value.indexOf(']') + 1) |
{ | ||
"name": "remark-lint-checkbox-content-indent", | ||
"version": "1.0.2", | ||
"description": "remark-lint rule to warn when list item checkboxes are followed by too much white-space", | ||
"version": "1.0.3", | ||
"description": "remark-lint rule to warn when list item checkboxes are followed by too much whitespace", | ||
"license": "MIT", | ||
@@ -17,5 +17,5 @@ "keywords": [ | ||
"bugs": "https://github.com/remarkjs/remark-lint/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)", | ||
"contributors": [ | ||
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)" | ||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)" | ||
], | ||
@@ -22,0 +22,0 @@ "files": [ |
@@ -5,4 +5,12 @@ <!--This file is generated--> | ||
Warn when list item checkboxes are followed by too much white-space. | ||
[![Build][build-badge]][build] | ||
[![Coverage][coverage-badge]][coverage] | ||
[![Downloads][downloads-badge]][downloads] | ||
[![Size][size-badge]][size] | ||
[![Sponsors][sponsors-badge]][collective] | ||
[![Backers][backers-badge]][collective] | ||
[![Chat][chat-badge]][chat] | ||
Warn when list item checkboxes are followed by too much whitespace. | ||
## Presets | ||
@@ -50,2 +58,4 @@ | ||
[npm][]: | ||
```sh | ||
@@ -55,3 +65,3 @@ npm install remark-lint-checkbox-content-indent | ||
## Usage | ||
## Use | ||
@@ -93,4 +103,54 @@ You probably want to use it on the CLI through a config file: | ||
## Contribute | ||
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways | ||
to get started. | ||
See [`support.md`][support] for ways to get help. | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
abide by its terms. | ||
## License | ||
[MIT](https://github.com/remarkjs/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com) | ||
[MIT][license] © [Titus Wormer][author] | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-lint/master.svg | ||
[build]: https://travis-ci.org/remarkjs/remark-lint | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg | ||
[coverage]: https://codecov.io/github/remarkjs/remark-lint | ||
[downloads-badge]: https://img.shields.io/npm/dm/remark-lint-checkbox-content-indent.svg | ||
[downloads]: https://www.npmjs.com/package/remark-lint-checkbox-content-indent | ||
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-lint-checkbox-content-indent.svg | ||
[size]: https://bundlephobia.com/result?p=remark-lint-checkbox-content-indent | ||
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg | ||
[backers-badge]: https://opencollective.com/unified/backers/badge.svg | ||
[collective]: https://opencollective.com/unified | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[npm]: https://docs.npmjs.com/cli/install | ||
[health]: https://github.com/remarkjs/.github | ||
[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md | ||
[support]: https://github.com/remarkjs/.github/blob/master/support.md | ||
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md | ||
[license]: https://github.com/remarkjs/remark-lint/blob/master/license | ||
[author]: https://wooorm.com |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6432
153