+ messageId: "missingRadix",
+ suggest: [
+ {
+ messageId: "addRadixParameter10",
+ fix(fixer) {
+ const sourceCode = context.getSourceCode();
+ const tokens = sourceCode.getTokens(node);
+ const lastToken = tokens[tokens.length - 1]; // Parenthesis.
+ const secondToLastToken = tokens[tokens.length - 2]; // May or may not be a comma.
+ const hasTrailingComma = secondToLastToken.type === "Punctuator" && secondToLastToken.value === ",";
+
+ return fixer.insertTextBefore(lastToken, hasTrailingComma ? " 10," : ", 10");
+ }
+ }
+ ]