Skip to content

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