description:"Disallows unnecessary references to `this`.",
optionExamples:[
true,
[
true,
(_a={},
_a[ALLOWED_THIS_NAMES]=["^self$"],
_a[ALLOW_THIS_DESTRUCTURING]=true,
_a),
],
],
options:{
additionalProperties:false,
properties:(_b={},
_b[ALLOW_THIS_DESTRUCTURING]={
type:"boolean",
},
_b[ALLOWED_THIS_NAMES]={
listType:"string",
type:"list",
},
_b),
type:"object",
},
optionsDescription:(_c=["\n Two options may be provided on an object:\n\n * `","` allows using destructuring to access members of `this` (e.g. `{ foo, bar } = this;`).\n * `","` may be specified as a list of regular expressions to match allowed variable names."],_c.raw=["\n Two options may be provided on an object:\n\n * \\`","\\` allows using destructuring to access members of \\`this\\` (e.g. \\`{ foo, bar } = this;\\`).\n * \\`","\\` may be specified as a list of regular expressions to match allowed variable names."],Lint.Utils.dedent(_c,ALLOW_THIS_DESTRUCTURING,ALLOWED_THIS_NAMES)),
rationale:"Assigning a variable to `this` instead of properly using arrow lambdas "
+"may be a symptom of pre-ES6 practices or not manging scope well.",
ruleName:"no-this-assignment",
type:"functionality",
typescriptOnly:false,
};
Rule.FAILURE_STRING_BINDINGS="Don't assign members of `this` to local variables.";