Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coffeelint-newline-after-function

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffeelint-newline-after-function

Validate a newline policy after function definitiions

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by21.71%
Maintainers
1
Weekly downloads
 
Created
Source

Coffeelint - Newline after Function

Validate a newline policy after every function definition

Description

This CoffeeLint plugin verifies whether or not your function definitions are followed by a newline. You can customise the number of newlines.

Installation

[sudo] npm install -g coffeelint-newline-after-function

Note: Right now a Coffeelint plugin cannot be installed as a project dependency and must be installed globally. Perhaps this will be improved in a future version of Coffeelint. If you would like to track progress on this enhancement head over here.

Usage

Insert the below configuration into coffeelint.json that you use for linting your scripts:

"newline_after_function": {
    "module": "coffeelint-newline-after-function"
    "value": 1,
    "level": "error",
}

Example

This code will lint without errors:

Class TestClass

  foo : ->

      @bar()

  bar : =>

      console.log("foo bar")

But this will fail:

Class TestClass

  foo : ->
    console.log("Oh no! I have linting errors.")

Configuration

The only configuration option specific to this plugin is the value property. Change this to the number of newlines that you like to be inforced.

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.

License

MIT © scalable minds

Keywords

FAQs

Package last updated on 11 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc