1.0.1 • Published 8 years ago

esformatter-line-endings v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

esformatter-line-endings

Format files with the line endings for your OS.

You probably don't want to use this. An esformatter pipe would probably be a better choice.

If you're still reading, this plugin helps teams where each Git user has different autocrlf settings. Everyone can keep their preferred settings. The plugin infers your computer's line endings based on an example file in your repository. Then, on esformatter runs, we replace all newline characters.

By default esformatter-jsx forces all newline characters to a LF. If you order esformatter-line-endings after esfomratter-jsx in the plugins array, the situation is resolved for Windows users.

Installation

$ npm install --save-dev esformatter-line-endings

Then edit your esformatter configuration to specify an example file in your repository. This file will be read on esformatter runs to determine your computer's line endings. Also, make sure you order esformatter-line-endings appropriately in the plugins array. Newlines won't be fixed for plugins after esformatter-line-endings in the array.

{
  "plugins": ["esformatter-jsx", "esformatter-line-endings"],
  "line_endings": {
    "example": "index.js"
  }
}