docs: {
description: "Disallow labels that share a name with a variable",
recommended: false,
- url: "https://eslint.org/docs/rules/no-label-var"
+ url: "https://eslint.org/docs/latest/rules/no-label-var"
},
schema: [],
},
create(context) {
+ const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
LabeledStatement(node) {
// Fetch the innermost scope.
- const scope = context.getScope();
+ const scope = sourceCode.getScope(node);
/*
* Recursively find the identifier walking up the scope, starting