JSPM

coffeelint-function-call-whitespace

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q36245F
  • License MIT

Coffeelint rule to ensure there is no whitespace between the first and last parentheses of a function call and its arguments

Package Exports

  • coffeelint-function-call-whitespace

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-function-call-whitespace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

coffeelint-function-call-whitespace

=====================================

Influenced by built-in Coffeelint rule no_implicit_parens

This is a plugin for Coffeelint. It enforces conventions about whitespace used when invoking functions.

  • It requires that function arguments are separated by at least one space.
  • If parentheses are used in the invocation, then there may not be whitespace after the openening paren or before the closing one.
# both valid
sum(2, 4)
sum 2, 4

# linting errors
sum( 2, 4)
sum(2, 4 )
sum( 2, 4 )

Installation

npm install coffeelint-function-call-whitespace --save-dev

Configuration

In coffeelint.json add

{
  "//": "other lint rules",
  {
    "function_call_whitespace": {
      "module": "coffeelint-function-call-whitespace",
      "level": "error"
    }
  }
}

Now future runs of coffeelint will check your function invocations for the above whitespace rules.