Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 894 Bytes

ban.md

File metadata and controls

56 lines (40 loc) · 894 Bytes

Ban methods (ban)

Allows you to bannish some methods or functions.

Rule Details

For example

[{
  "name": "functionName",
  "message": "my custom message because you use the function functionName"
}]

Examples of incorrect code for this rule:

var result = functionName('myString');

Examples of correct code for this rule:

var result = _functionName('myString');

Options

Simple function

[{
  "name": "functionName",
  "message": "my custom message because you use the function functionName"
}]

Method on every kind of objects

[{
  "name": ["*", "functionName"],
  "message": "my custom message because you use the function functionName"
}]

Method on object named myObj

[{
  "name": ["myObj", "functionName"],
  "message": "my custom message because you use the function functionName"
}]