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

tools: enable whitespace related rules in eslint #1971

Closed
wants to merge 2 commits into from

Conversation

silverwind
Copy link
Contributor

This enforces the following rules in eslint:

  • no trailing whitespace
  • require newline at end of files
  • maximum of two consecutive empty lines

I initally wanted to enforce a single newline at the end of files, but it seems there's no fitting rule for that yet, so ending a file in \n\n is not an error right now, unfortunately.

cc: @yosuke-furukawa

@mscdex mscdex added the meta Issues and PRs related to the general management of the project. label Jun 13, 2015
@silverwind
Copy link
Contributor Author

Note this only warns on whitespace issues. We could go one step further with an .editorconfig to enable auto-fixing of the final newline and trimming of lines. It'd be another dotfile in the tree though.

@bnoordhuis
Copy link
Member

LGTM

silverwind added a commit that referenced this pull request Jun 15, 2015
PR-URL: #1971
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
silverwind added a commit that referenced this pull request Jun 15, 2015
Enables rules for trailing whitespace, final newline and maximum
consecutive empty lines.

PR-URL: #1971
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@silverwind
Copy link
Contributor Author

Landed in fb8811d .. 3777f41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants