eslint-plugin-function-call-context

1.0.2 • Public • Published

eslint-plugin-function-call-context

ESLint plugin to verify that some functions are called in the correct context.

Configuration

"rules"{
  "function-call-context/call-in-function": ["error", {
    "functions": ["functionA", "functionB"],
    "methods": ["methodA", "methodB"]
  }],
}

Rules

call-in-function

This rule checks that certain functions are called inside of another function.

This can be useful if you don't want to run these functions right when the script is loaded.

Invalid

const myVar = myFunction()

Valid

function outerFunction() {
  const myVar = myFunction()
}

Options

"function-call-context/call-in-function"[<enabled>, {
  "functions": [<string>],
  "methods": [<string>]
}]

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-function-call-context

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

3.87 kB

Total Files

10

Last publish

Collaborators

  • glinkis