{"version":3,"file":"no-task-comment.cjs","names":[],"sources":["../../../src/rules/code-style/no-task-comment.ts"],"sourcesContent":["import type {Rule} from 'eslint'\n\nconst rule: Rule.RuleModule = {\n  meta: {\n    type: 'layout',\n    docs: {\n      description: 'Remove comments containing task markers (TODO, FIXME, etc.)',\n      recommended: false\n    },\n    messages: {\n      noTaskComment: 'Task comments (TODO, FIXME) should be addressed and removed.'\n    },\n    schema: []\n  },\n  create(context) {\n    const {sourceCode} = context\n    const taskKeywords = ['TODO', 'FIXME', 'todo', 'fixme']\n    const taskPattern = new RegExp(`^\\\\s*(?:\\\\*\\\\s*)?(?:${taskKeywords.join('|')})`, 'm') // Match line start, optional star (for block comments), optional space, then keyword\n\n    return {\n      Program() {\n        const comments = sourceCode.getAllComments()\n\n        for (const comment of comments) {\n          const content = comment.value\n          if (taskPattern.test(content)) context.report({loc: comment.loc!, messageId: 'noTaskComment'})\n        }\n      }\n    }\n  }\n}\n\nexport default rule\n"],"mappings":";;AAEA,MAAM,OAAwB;CAC5B,MAAM;EACJ,MAAM;EACN,MAAM;GACJ,aAAa;GACb,aAAa;GACd;EACD,UAAU,EACR,eAAe,gEAChB;EACD,QAAQ,EAAE;EACX;CACD,OAAO,SAAS;EACd,MAAM,EAAC,eAAc;EAErB,MAAM,cAAc,IAAI,OAAO,uBADV;GAAC;GAAQ;GAAS;GAAQ;GAAQ,CACY,KAAK,IAAI,CAAC,IAAI,IAAI;AAErF,SAAO,EACL,UAAU;GACR,MAAM,WAAW,WAAW,gBAAgB;AAE5C,QAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,UAAU,QAAQ;AACxB,QAAI,YAAY,KAAK,QAAQ,CAAE,SAAQ,OAAO;KAAC,KAAK,QAAQ;KAAM,WAAW;KAAgB,CAAC;;KAGnG;;CAEJ"}