JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 364
  • Score
    100M100P100Q109454F
  • License BSD-3-Clause

Validates a newline policy at the end of each file

Package Exports

  • coffeelint-newline-at-eof

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coffeelint-newline-at-eof) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CoffeeLint - Newline At End Of File Build Status

Description

This CoffeeLint plugin verifies whether or not your files end with a newline. You can customise its behaviour to either enforce newlines at the end of each file or to prohibit them.

Installation

npm install coffeelint-newline-at-eof [--save-dev]

Note: You might have to install the plugin as a global plugin ( -g ) if you use coffeelint.json in your $HOME directory.

Usage

  1. Generate or edit your coffeelint.json configuration file: this is usually done via coffeelint --makeconfig > ~/coffeelint.json for user-level Coffeelint configurations
  2. Insert the below configuration into coffeelint.json
"newline_at_eof": {
    "module": "coffeelint-newline-at-eof",
    "level": "error",
    "behaviour": "require"
}

Configuration

The only configuration option specific to this plugin is the behaviour property.

Available values are:

  • require - Newlines are required to be present at the end of file
  • forbid - Newlines are forbidden to be present at the end of file

By default, Coffeelint will report errors if this rule is not satisfied. You may want to relax this by setting the level to warn in your configuration.

Credits

Thanks to Matt Perpick, the creator of Coffeelint and to all contributors to the project for their excellent work.

License

This software is licensed under the BSD (3-Clause) License. See the LICENSE file for more information.