[{"data":1,"prerenderedAt":235},["ShallowReactive",2],{"post:ignore-rules-in-cflint":3},{"id":4,"title":5,"body":6,"date":222,"description":223,"draft":224,"extension":225,"meta":226,"navigation":227,"path":228,"seo":229,"stem":230,"tags":231,"__hash__":234},"posts\u002Fposts\u002Fignore-rules-in-cflint.md","TIL: Ignore Linting Rules in CFLint",{"type":7,"value":8,"toc":220},"minimark",[9,42,51,65,116,129,132,216],[10,11,12,13,20,21,26,27,32,33,37,38,41],"p",{},"So, ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fgithub.com\u002Fcflint\u002FCFLint",[18],"nofollow","CFLint"," is super useful for CF development. There's a ",[14,22,25],{"href":23,"rel":24},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=KamasamaK.vscode-cflint",[18],"VS Code Extension"," which can lint your CF tag or script syntax on the fly, and there is also a ",[14,28,31],{"href":29,"rel":30},"https:\u002F\u002Fwww.forgebox.io\u002Fview\u002Fcommandbox-cflint",[18],"CommandBox Package"," which can lint an entire folder of ",[34,35,36],"code",{},".cfm"," or ",[34,39,40],{},".cfc"," files.",[10,43,44,45,50],{},"CFLint has a lot of rules, some of which are useful and some of which are ",[14,46,49],{"href":47,"rel":48},"https:\u002F\u002Fgithub.com\u002Fcflint\u002FCFLint\u002Fblob\u002Fmaster\u002Fsrc\u002Fmain\u002Fresources\u002Fcflint.definition.json",[18],"less so",". Here's where I figured out how to turn off the more annoying \u002F less useful linting rules.",[52,53,54,62],"ol",{},[55,56,57,58,61],"li",{},"Create a ",[34,59,60],{},".cflintrc"," file in the root of your project.",[55,63,64],{},"Paste in the following JSON:",[66,67,72],"pre",{"className":68,"code":69,"language":70,"meta":71,"style":71},"language-json shiki shiki-themes github-light github-dark","{ \n    \"rule\": [],\n    \"excludes\": [],\n    \"includes\": []\n}\n","json","",[34,73,74,83,93,101,110],{"__ignoreMap":71},[75,76,79],"span",{"class":77,"line":78},"line",1,[75,80,82],{"class":81},"sVt8B","{ \n",[75,84,86,90],{"class":77,"line":85},2,[75,87,89],{"class":88},"sj4cs","    \"rule\"",[75,91,92],{"class":81},": [],\n",[75,94,96,99],{"class":77,"line":95},3,[75,97,98],{"class":88},"    \"excludes\"",[75,100,92],{"class":81},[75,102,104,107],{"class":77,"line":103},4,[75,105,106],{"class":88},"    \"includes\"",[75,108,109],{"class":81},": []\n",[75,111,113],{"class":77,"line":112},5,[75,114,115],{"class":81},"}\n",[52,117,118],{"start":95},[55,119,120,121,124,125,128],{},"Add whichever rules you wish to exclude to the ",[34,122,123],{},"excludes"," array. Or, if you only wish to check for a small set of rules, add those to the ",[34,126,127],{},"includes"," array.",[10,130,131],{},"Here's the final result:",[66,133,135],{"className":68,"code":134,"language":70,"meta":71,"style":71},"{ \n    \"rule\": [],\n    \"excludes\": [\n        {\n            \"code\": \"UNQUOTED_STRUCT_KEY\"\n        },\n        {\n            \"code\": \"LOCAL_LITERAL_VALUE_USED_TOO_OFTEN\"\n        }\n    ],\n    \"includes\": []\n}\n",[34,136,137,141,147,154,159,171,177,182,192,198,204,211],{"__ignoreMap":71},[75,138,139],{"class":77,"line":78},[75,140,82],{"class":81},[75,142,143,145],{"class":77,"line":85},[75,144,89],{"class":88},[75,146,92],{"class":81},[75,148,149,151],{"class":77,"line":95},[75,150,98],{"class":88},[75,152,153],{"class":81},": [\n",[75,155,156],{"class":77,"line":103},[75,157,158],{"class":81},"        {\n",[75,160,161,164,167],{"class":77,"line":112},[75,162,163],{"class":88},"            \"code\"",[75,165,166],{"class":81},": ",[75,168,170],{"class":169},"sZZnC","\"UNQUOTED_STRUCT_KEY\"\n",[75,172,174],{"class":77,"line":173},6,[75,175,176],{"class":81},"        },\n",[75,178,180],{"class":77,"line":179},7,[75,181,158],{"class":81},[75,183,185,187,189],{"class":77,"line":184},8,[75,186,163],{"class":88},[75,188,166],{"class":81},[75,190,191],{"class":169},"\"LOCAL_LITERAL_VALUE_USED_TOO_OFTEN\"\n",[75,193,195],{"class":77,"line":194},9,[75,196,197],{"class":81},"        }\n",[75,199,201],{"class":77,"line":200},10,[75,202,203],{"class":81},"    ],\n",[75,205,207,209],{"class":77,"line":206},11,[75,208,106],{"class":88},[75,210,109],{"class":81},[75,212,214],{"class":77,"line":213},12,[75,215,115],{"class":81},[217,218,219],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":71,"searchDepth":85,"depth":85,"links":221},[],"2019-02-28T17:40:26-05:00","So, CFLint is super useful for CF development. There's a VS Code Extension which can lint your CF tag or script syntax on the fly, and there is also a CommandBox Package which can lint an entire folder of .cfm or .cfc files.",false,"md",{},true,"\u002Fposts\u002Fignore-rules-in-cflint",{"title":5,"description":223},"posts\u002Fignore-rules-in-cflint",[232,233],"coldfusion","til","Uop8uh1pDBOrsvtVLL25fkXTKO5M2-Ep9jlieD0ulrY",1790471527957]