eslint-plugin-comment-length
Version:
An ESLint plugin that provides rules that limit the line length of your comments
1 lines • 1.92 kB
Source Map (JSON)
{"version":3,"file":"rule.cjs","sources":["../../../../src/rules/limit-multi-line-comments/rule.ts"],"sourcesContent":["import { ESLintUtils } from \"@typescript-eslint/utils\";\n\nimport { MessageIds, 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 { limitMultiLineComments } from \"./root.js\";\n\nconst createRule = ESLintUtils.RuleCreator(resolveDocsRoute);\n\nexport const limitMultiLineCommentsRule = createRule<RuleOptions, MessageIds>({\n name: \"limit-multi-line-comments\",\n defaultOptions,\n meta: {\n type: \"layout\",\n fixable: \"whitespace\",\n messages: reportMessages,\n docs: {\n description:\n \"Reflows multi-line comments to ensure that blocks never exceed the configured length\",\n },\n schema: optionsSchema,\n },\n\n create: (ruleContext, [options]) => {\n const sourceCode = ruleContext.sourceCode;\n const comments = sourceCode.getAllComments();\n\n limitMultiLineComments(ruleContext, options, comments);\n\n return {};\n },\n});\n"],"names":["ESLintUtils","resolveDocsRoute","defaultOptions","reportMessages","optionsSchema","limitMultiLineComments"],"mappings":";;;;;;;;AAYA,MAAM,UAAA,GAAaA,iBAAY,CAAA,WAAA,CAAYC,iCAAgB,CAAA,CAAA;AAEpD,MAAM,6BAA6B,UAAoC,CAAA;AAAA,EAC5E,IAAM,EAAA,2BAAA;AAAA,kBACNC,8BAAA;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,QAAA;AAAA,IACN,OAAS,EAAA,YAAA;AAAA,IACT,QAAU,EAAAC,+BAAA;AAAA,IACV,IAAM,EAAA;AAAA,MACJ,WACE,EAAA,sFAAA;AAAA,KACJ;AAAA,IACA,MAAQ,EAAAC,6BAAA;AAAA,GACV;AAAA,EAEA,MAAQ,EAAA,CAAC,WAAa,EAAA,CAAC,OAAO,CAAM,KAAA;AAClC,IAAA,MAAM,aAAa,WAAY,CAAA,UAAA,CAAA;AAC/B,IAAM,MAAA,QAAA,GAAW,WAAW,cAAe,EAAA,CAAA;AAE3C,IAAuBC,2BAAA,CAAA,WAAA,EAAa,SAAS,QAAQ,CAAA,CAAA;AAErD,IAAA,OAAO,EAAC,CAAA;AAAA,GACV;AACF,CAAC;;;;"}