Skip to content

Conversation

@lydell
Copy link
Collaborator

@lydell lydell commented Sep 3, 2015

This was done by first checking all files in the repository root by hand, and
then by doing the following:

$ npm i get-stdin@4
$ cat clean.coffee
fs = require 'fs'
stdin = require 'get-stdin'

stdin (text) ->
  for file in text.trim().split('\n')
    contents = fs.readFileSync file
      .toString().replace /\s*$/, '\n'
    fs.writeFileSync file, contents
  return
$ ls !(node_modules)/**/*.coffee | coffee clean.coffee

Ideally merged after #4079.

This was done by first checking all files in the repository root by hand, and
then by doing the following:

    $ npm i get-stdin@4
    $ cat clean.coffee
    fs = require 'fs'
    stdin = require 'get-stdin'

    stdin (text) ->
      for file in text.trim().split('\n')
        contents = fs.readFileSync file
          .toString().replace /\s*$/, '\n'
        fs.writeFileSync file, contents
      return
    $ ls !(node_modules)/**/*.coffee | coffee clean.coffee
michaelficarra added a commit that referenced this pull request Sep 4, 2015
Ensure that all source files end with a single `\n`
@michaelficarra michaelficarra merged commit 8711da0 into jashkenas:master Sep 4, 2015
@michaelficarra
Copy link
Collaborator

Thanks.

@lydell lydell deleted the single-newline-at-eof branch November 2, 2015 06:58
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

Successfully merging this pull request may close these issues.

3 participants