Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Latest commit

 

History

History
61 lines (49 loc) · 1.65 KB

terFuncCallSpacingRule.md

File metadata and controls

61 lines (49 loc) · 1.65 KB

ter-func-call-spacing (ESLint: func-call-spacing)

rule_source test_source

require or disallow spacing between function identifiers and their invocations

Rationale

This rule will enforce consistency of spacing in function calls, by disallowing or requiring one or more spaces before the open paren.

Config

This rule has a string option:

  • "never" (default) disallows space between the function name and the opening parenthesis.
  • "always" requires space between the function name and the opening parenthesis.

Further, in "always" mode, a second object option is available that contains a single boolean allowNewlines property.

Examples

"ter-func-call-spacing": [true]
"ter-func-call-spacing": [true, "always"]
"ter-func-call-spacing": [true, "always", { allowNewlines: true }]

Schema

{
  "type": "array",
  "items": [
    {
      "enum": [
        "always",
        "never"
      ]
    },
    {
      "type": "object",
      "properties": {
        "allowNewlines": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  ],
  "minItems": 0,
  "maxItems": 2
}