Simply defining a linter does not enable it. Trunk needs to know when to auto-enable the linter for certain projects (ex: all python projects) or if certain files are already present (ex:Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
.eslintrc).
Auto Enabling
Thedirect_configs property contains a list of config files that the underlying linter uses. The suggest_if property determines when trunk check should suggest this linter. If suggest_if is set to config_present, then trunk will search for the listed config files. If found, the linter will be enabled automatically when the user does trunk init or trunk update.
For example: in the following yaml, the flake8 linter sets suggest_if to config_preset and sets direct_configs to [.flake8]. If any *.flake8 files are found, then trunk check will automatically enable flake8.
Flake8 linter definition. full source
config_presentwill auto-enable a linter if Trunk sees anydirect_configfor it .files_presentwill auto-enable a linter if Trunk sees any file type that it operates on.neverwill never auto-enable this linter.
suggest_if for all linters in the plugins repo.
Manually enabling and disabling
Setting thelint.definitions[*].enabled property to true will force the linter to be enabled. Setting the lint.definitions[*].disabled property to true will force the linter to never be enabled, even if the enabled property is true, and will never suggest this linter, even if suggest_if says it should.
For additional information on the properties of Linters, see the Linter Definition Reference.