The "extends": "@jaredmcateer/shouldjs:recommended"
property in a configuration file enables this rule.
Disallows assigning a variable for Should.js that isn't part of the approved list. This is set by the shouldVarNames
array in settings property of the eslint config.
Given an eslint configurations
{
settings: {
shouldVarNames: ["should"];
}
}
Examples of incorrect code for this rule:
const expect = require("should");
import expect from "should";
Examples of correct code for this rule:
const should = require("should");
import should from "should";
It is not recommended to turn this rule off. Other rules in the plugin rely on the variable name when using the Should.js function to decide whether to lint by assigning it an unknown value those rules will not be run.