esformatter-line-endings

1.0.1 • Public • Published

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"
  }
}

Readme

Keywords

Package Sidebar

Install

npm i esformatter-line-endings

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • stevekroh