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

Impossible to satisfy eol-last rule #48

Closed
BYK opened this issue Jan 21, 2016 · 3 comments
Closed

Impossible to satisfy eol-last rule #48

BYK opened this issue Jan 21, 2016 · 3 comments

Comments

@BYK
Copy link
Member

BYK commented Jan 21, 2016

With the upgrade to remark, it is not impossible to enforce eol-last because all trailing whitespace on code blocks are removed.

May be a good idea to silence this completely internally if possible. Or at least say something about this on docs.

@btmills
Copy link
Member

btmills commented Jan 22, 2016

Yeah, I think it makes sense to say that rule doesn't really apply in the context of a Markdown code block. I see two options:

  1. Document this and require people to disable this rule in a Markdown-specific config. If there are other rules like this, it may be necessary.
  2. Like you suggested, we can silence this internally by filtering out eol-last errors during postprocessing. Hopefully this option is sufficient.

Before making a decision, are there any other rules that don't apply?

@BYK
Copy link
Member Author

BYK commented Jan 22, 2016

I'd love to do 1 but until we have configuration per file/glob it doesn't look practical (or unless we can find a way to set rules inside Markdown files without using comments in code blocks) so I'd go with 2 with proper documentation.

I haven't seen any other rules yet. no-trailing-spaces and no-irregular-whitespace are other potential rules that my not be applicable.

@btmills
Copy link
Member

btmills commented Jan 22, 2016

I'd really like to be able to do 1 as well. For reference, glob-based configuration is eslint/eslint#3611. I'll post over there and see if I can help out.

btmills added a commit that referenced this issue Apr 21, 2016
Fix: Exclude eol-last from output (fixes #48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants