There are many lint rules provided by DHP for mcfunction files, which are put under the datapack.lint.* config section.

🎨 Stylistic Rules

These rules are used when you are formatting your functions to enforce a consistent style.

⚠️ Diagnostic Rules

These rules are used for computing diagnostics. Some violations of these rules can be fixed by Code Actions automatically.

All the values of diagnostic rules should be put in an array where the first element represents the severity and the second element represents the value.

{
    "datapack.lint.<Name Of The Diagnostic Rule>": ["<Severity>", <Value>]
}

The severity could be one of the following values:

  • hint: displayed as gray dash lines in VSCode.
  • information: displayed as blue lines in VSCode.
  • warning: displayed as yellow lines in VSCode.
  • error: displayed as red lines in VSCode.

Alternatively, you can set the whole rule to null to disable it.

{
    "datapack.lint.<Name Of The Diagnostic Rule>": null
}