'use strict';
import { ESLintUtils } from '@typescript-eslint/utils';
import { nodeTypes } from '@flint/infra/analysis';
import { ruleTypes, url } from '@flint/infra/constants/rules-meta';
import { eslintFixTypeNames } from '../../../base-repo/constants/internal-common-strings.js';
import { first } from '../../../fd-toolbox/server/collections/single-funcs.js';

const ruleName='must-add-space-for-comments';const constants={'messageIds':{'mustAddSpaceForComments':'mustAddSpaceForComments'},'meta':{'type':ruleTypes['suggestion'],'docs':{'description':'Enforce\x20a\x20space\x20after\x20//\x20in\x20single-line\x20comments,\x20excluding\x20///,\x20//!,\x20//#'},'messages':{'mustAddSpaceForComments':'must-add-space-for-comments\x0a###\x20**Must**\x20add\x20space\x20for\x20comments.\x0a\x0a####\x20Wrong\x0a\x0a//Foo\x0a\x0a####\x20Correct\x0a\x0a//\x20Foo\x0a\x0a####\x20Why\x0a\x0aUsed\x20to\x20visually\x20separate\x20readable\x20text\x20from\x20reserved\x20characters.'},'schema':[],'fixable':eslintFixTypeNames['whitespace']}},createRule=ESLintUtils['RuleCreator'](_0x298b46=>''+url+_0x298b46),mustAddSpaceForComments=createRule({'name':ruleName,'meta':constants['meta'],'defaultOptions':[],'create'(_0x63a7c0){return {'Program'(){const _0x1701a6=_0x63a7c0['sourceCode'],_0x4ca1c0=_0x1701a6['getAllComments'](),_0x4da130=/^\/\/[^/\s!#]/;_0x4ca1c0['forEach'](_0x39e39a=>{const _0x4b1f4d=_0x1701a6['getText'](_0x39e39a);_0x39e39a['type']===nodeTypes['Line']&&_0x4da130['test'](_0x4b1f4d)&&_0x63a7c0['report']({'node':_0x39e39a,'messageId':constants['messageIds']['mustAddSpaceForComments'],'fix'(_0x40dc75){return _0x40dc75['insertTextAfterRange']([first(_0x39e39a['range']),first(_0x39e39a['range'])+(0x675*0x1+0x1dee+-0x2461)],'\x20');}});});}};}});

export { mustAddSpaceForComments as default, ruleName };
