code: function isAfterLastUsedArg(variable) {
              const def = variable.defs[0];
              const params = context.getDeclaredVariables(def.node);
              const posteriorParams = params.slice(params.indexOf(variable) + 1);
  
              // If any used parameters occur after this parameter, do not report.
              return !posteriorParams.some(v => v.references.length > 0 || v.eslintUsed);
          }
docs: Checks whether the given variable is after the last used parameter.
  
  @param {eslint-scope.Variable} variable - The variable to check.
  @returns {boolean} `true` if the variable is defined after the last
  used parameter.