{"record":{"id":"c5a085e9035c995c","repo":"denoland/deno","slug":"prefix-linter-plugin-name-must-not-have-consequt","errorCode":null,"errorMessage":"${prefix}Linter plugin name must not have consequtive hyphens.","messagePattern":"(.+?)Linter plugin name must not have consequtive hyphens\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/js/40_lint.js","lineNumber":499,"sourceCode":"    : \"\";\n  if (typeof plugin !== \"object\") {\n    throw new Error(`${prefix}Linter plugin must be an object`);\n  }\n  if (typeof plugin.name !== \"string\") {\n    throw new Error(`${prefix}Linter plugin name must be a string`);\n  }\n  if (!/^[a-z-]+$/.test(plugin.name)) {\n    throw new Error(\n      `${prefix}Linter plugin name must only contain lowercase letters (a-z) or hyphens (-).`,\n    );\n  }\n  if (plugin.name.startsWith(\"-\") || plugin.name.endsWith(\"-\")) {\n    throw new Error(\n      `${prefix}Linter plugin name must start and end with a lowercase letter.`,\n    );\n  }\n  if (plugin.name.includes(\"--\")) {\n    throw new Error(\n      `${prefix}Linter plugin name must not have consequtive hyphens.`,\n    );\n  }\n  if (typeof plugin.rules !== \"object\") {\n    throw new Error(`${prefix}Linter plugin rules must be an object`);\n  }\n  if (state.installedPlugins.has(plugin.name)) {\n    throw new Error(`Linter plugin ${plugin.name} has already been registered`);\n  }\n  state.plugins.push(plugin);\n  state.installedPlugins.add(plugin.name);\n\n  return {\n    name: plugin.name,\n    ruleNames: Object.keys(plugin.rules),\n  };\n}\n","sourceCodeStart":481,"sourceCodeEnd":517,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/js/40_lint.js#L481-L517","documentation":"The third naming rule for Deno lint plugins: the name must not contain two hyphens in a row (plugin.name.includes(\"--\") in cli/js/40_lint.js). Like the other checks it runs at plugin install time and keeps names canonical kebab-case. Note the message contains a source-level typo — \"consequtive\" instead of \"consecutive\" — so search logs and docs for the exact misspelled text.","triggerScenarios":"Installing a lint plugin whose `name` is \"my--plugin\", \"a---b\", or any name containing \"--\". The name already passed the charset and edge-hyphen checks.","commonSituations":"Concatenating name parts with '-' where one part is empty (\"team\" + \"-\" + \"\" + \"-rules\"); hand-editing a name and doubling the hyphen; normalizing \"my plugin\" to \"my--plugin\" by mistake.","solutions":["Collapse repeated hyphens to a single one: \"my--plugin\" → \"my-plugin\".","If the name is assembled from parts, filter out empty segments before joining with '-'.","Apply name.replace(/-{2,}/g, \"-\") at generation time, then re-run `deno lint`."],"exampleFix":"// before\nexport default {\n  name: \"team--lint-rules\",\n  rules: {},\n};\n\n// after\nexport default {\n  name: \"team-lint-rules\",\n  rules: {},\n};","handlingStrategy":"validation","validationCode":"const name = raw.replace(/-{2,}/g, \"-\"); // collapse doubles before exporting\nexport default { name, rules };","typeGuard":"/** @param {unknown} name @returns {boolean} */\nfunction hasNoConsecutiveHyphens(name) {\n  return typeof name === \"string\" && !name.includes(\"--\");\n}","tryCatchPattern":null,"preventionTips":["If names are generated, run .replace(/-{2,}/g, \"-\") at build time.","Remember the error text misspells 'consequtive' — search logs for the exact string."],"tags":["deno","deno-lint","lint-plugin","validation","naming"],"backgroundTag":"plugin-validation-failed","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}