{"version":3,"file":"rule.cjs","sources":["../../../../src/rules/limit-single-line-comments/rule.ts"],"sourcesContent":["import { type TSESTree, ESLintUtils } from \"@typescript-eslint/utils\";\n\nimport type { MessageIds } from \"../../const.message-ids.js\";\nimport { reportMessages } from \"../../const.message-ids.js\";\nimport {\n  type RuleOptions,\n  defaultOptions,\n  optionsSchema,\n} from \"../../typings.options.js\";\nimport { resolveDocsRoute } from \"../../utils/resolve-docs-route.js\";\n\nimport { limitSingleLineComments } from \"./root.js\";\n\nconst createRule = ESLintUtils.RuleCreator(resolveDocsRoute);\n\nexport const limitSingleLineCommentsRule = createRule<RuleOptions, MessageIds>({\n  name: \"limit-single-line-comments\",\n  defaultOptions,\n  meta: {\n    type: \"layout\",\n    fixable: \"whitespace\",\n    messages: reportMessages,\n    docs: {\n      description:\n        \"Reflows single-line comments to ensure that blocks never exceed the configured length\",\n    },\n    schema: optionsSchema,\n  },\n  create: (ruleContext, [options]) => {\n    const sourceCode = ruleContext.sourceCode;\n    const comments = sourceCode\n      .getAllComments()\n      .filter((it): it is TSESTree.LineComment => it.type === \"Line\");\n\n    limitSingleLineComments(ruleContext, options, comments);\n\n    return {};\n  },\n});\n"],"names":["ESLintUtils","resolveDocsRoute","defaultOptions","reportMessages","optionsSchema","limitSingleLineComments"],"mappings":";;;;;;;;AAaA,MAAM,UAAA,GAAaA,iBAAA,CAAY,WAAA,CAAYC,iCAAgB,CAAA;AAEpD,MAAM,8BAA8B,UAAA,CAAoC;AAAA,EAC7E,IAAA,EAAM,4BAAA;AAAA,kBACNC,8BAAA;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,QAAA;AAAA,IACN,OAAA,EAAS,YAAA;AAAA,IACT,QAAA,EAAUC,+BAAA;AAAA,IACV,IAAA,EAAM;AAAA,MACJ,WAAA,EACE;AAAA,KACJ;AAAA,IACA,MAAA,EAAQC;AAAA,GACV;AAAA,EACA,MAAA,EAAQ,CAAC,WAAA,EAAa,CAAC,OAAO,CAAA,KAAM;AAClC,IAAA,MAAM,aAAa,WAAA,CAAY,UAAA;AAC/B,IAAA,MAAM,QAAA,GAAW,WACd,cAAA,EAAe,CACf,OAAO,CAAC,EAAA,KAAmC,EAAA,CAAG,IAAA,KAAS,MAAM,CAAA;AAEhE,IAAAC,4BAAA,CAAwB,WAAA,EAAa,SAAS,QAAQ,CAAA;AAEtD,IAAA,OAAO,EAAC;AAAA,EACV;AACF,CAAC;;;;"}