Zhihui-Platform / client

Found single char variable name JS-C1002
Anti-pattern
Minor
a year ago2 years old
 3import { join } from "node:path";
 4import { tmpdir, platform } from "node:os";
 5
 6const $ = execSync; 7
 8export async function installPackage() {
 9  const node_folder = join(tmpdir(), "..", "zhihui", "runtimes", "nodejs");
Variable name is too small.
 77  md.use(container, "info", {
 78    validate: (params) => params.trim().match(/^info\s+(.*)$/),
 79    render: (tokens, idx) => {
 80      const m = tokens[idx].info.trim().match(/^info\s+(.*)$/); 81      if (tokens[idx].nesting === 1) {
 82        return `<div class="custom-block info"><p class="custom-block-title">${md.utils.escapeHtml(m![1])}</p>\n`;
 83      } else {
Variable name is too small.
 66  md.use(container, "danger", {
 67    validate: (params) => params.trim().match(/^danger\s+(.*)$/),
 68    render: (tokens, idx) => {
 69      const m = tokens[idx].info.trim().match(/^danger\s+(.*)$/); 70      if (tokens[idx].nesting === 1) {
 71        return `<div class="custom-block danger"><p class="custom-block-title">${md.utils.escapeHtml(m![1])}</p>\n`;
 72      } else {
Variable name is too small.
 55  md.use(container, "warning", {
 56    validate: (params) => params.trim().match(/^warning\s+(.*)$/),
 57    render: (tokens, idx) => {
 58      const m = tokens[idx].info.trim().match(/^warning\s+(.*)$/); 59      if (tokens[idx].nesting === 1) {
 60        return `<div class="custom-block warning"><p class="custom-block-title">${md.utils.escapeHtml(m![1])}</p>\n`;
 61      } else {
Variable name is too small.
 44  md.use(container, "tip", {
 45    validate: (params) => params.trim().match(/^tip\s+(.*)$/),
 46    render: (tokens, idx) => {
 47      const m = tokens[idx].info.trim().match(/^tip\s+(.*)$/); 48      if (tokens[idx].nesting === 1) {
 49        return `<div class="custom-block tip"><p class="custom-block-title">${md.utils.escapeHtml(m![1])}</p>\n`;
 50      } else {