eslint-plugin-comment-length
Version:
An ESLint plugin that provides rules that limit the line length of your comments
1 lines • 1 kB
Source Map (JSON)
{"version":3,"file":"is-another-wrap-point-coming.cjs","sources":["../../../src/utils/is-another-wrap-point-coming.ts"],"sourcesContent":["import { isPunctuation } from \"./is-punctuation.js\";\n\nexport function isAnotherWrapPointComing(\n currentLength: number,\n maxLength: number,\n wordsToCome: string[],\n): boolean {\n for (const word of wordsToCome) {\n if (isPunctuation(word.at(-1)) && word.length > 1) {\n return true;\n }\n currentLength += word.length + 1;\n if (currentLength >= maxLength) {\n return false;\n }\n }\n return false;\n}\n"],"names":["isPunctuation"],"mappings":";;;;AAEgB,SAAA,wBAAA,CACd,aACA,EAAA,SAAA,EACA,WACS,EAAA;AACT,EAAA,KAAA,MAAW,QAAQ,WAAa,EAAA;AAC9B,IAAI,IAAAA,2BAAA,CAAc,KAAK,EAAG,CAAA,CAAA,CAAE,CAAC,CAAK,IAAA,IAAA,CAAK,SAAS,CAAG,EAAA;AACjD,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AACA,IAAA,aAAA,IAAiB,KAAK,MAAS,GAAA,CAAA,CAAA;AAC/B,IAAA,IAAI,iBAAiB,SAAW,EAAA;AAC9B,MAAO,OAAA,KAAA,CAAA;AAAA,KACT;AAAA,GACF;AACA,EAAO,OAAA,KAAA,CAAA;AACT;;;;"}