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.
CFLint has a lot of rules, some of which are useful and some of which are less so. Here's where I figured out how to turn off the more annoying / less useful linting rules.
- Create a
.cflintrc
file in the root of your project. - Paste in the following JSON:
{
"rule": [],
"excludes": [],
"includes": []
}
- Add whichever rules you wish to exclude to the
excludes
array. Or, if you only wish to check for a small set of rules, add those to theincludes
array.
Here's the final result:
{
"rule": [],
"excludes": [
{
"code": "UNQUOTED_STRUCT_KEY"
},
{
"code": "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN"
}
],
"includes": []
}