Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect "Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)" #178

Closed
jpluimers opened this issue Apr 28, 2018 · 6 comments
Labels
🙋 no/question This does not need any changes

Comments

@jpluimers
Copy link

In Atom.io, the below markdown incorrectly throws "Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)" warnings.

How can I track this down on a plain console/terminal with a small demo file?

# Heading 1

## List at left margin

- one
- two
  - two.one

## List indented two

  - one
  - two
    - two.one

## results

> Warning	remark-lint	Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)	5:3
> Warning	remark-lint	Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)	6:3
> Warning	remark-lint	Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)	7:5
> Warning	remark-lint	Incorrect indentation before bullet: remove 2 spaces (remark-lint:list-item-bullet-indent)	11:3
> Warning	remark-lint	Incorrect indentation before bullet: remove 2 spaces (remark-lint:list-item-bullet-indent)	12:3
> Warning	remark-lint	Incorrect list-item indent: add 2 spaces (remark-lint:list-item-indent)	13:7
@wooorm
Copy link
Member

wooorm commented Apr 30, 2018

Hi Jeroen, you can configure rules, see the examples for this rule on how to configure your preferred style!

@wooorm wooorm closed this as completed Apr 30, 2018
@jpluimers
Copy link
Author

This is with defaults in atom.io, so I was wondering why it fails with those.

@wooorm
Copy link
Member

wooorm commented May 2, 2018

tab-size is safer across markdown flavours: it makes sure that nested indented code blocks work the same everywhere!

If you’re in atom, you should be able to configure it. Or use linter-remark directly!

@jpluimers
Copy link
Author

Could it also check the the current settings and warn about more reasonable defaults?

@adelespinasse
Copy link

Note to anyone seeing this error: Apparently the default configuration requires 3 spaces between the bullet character and the text. So it doesn't seem to really be about indentation (as I understand it). Changing from this:

* One
* Two
* Three

to this:

*   One
*   Two
*   Three

fixed it for me. I had to determine this experimentally since the documentation doesn't seem to mention it.

(I don't run remark-link in my own environment, but it was enabled by default in Codacy (auto-checker for pull requests), and I thought it would be easier and better to conform to default style guidelines rather than try to figure out how to change the configuration.)

@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 15, 2019
@bkdotcom

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

4 participants