Introduce "preset" config #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See also terraform-linters/tflint#1056
This PR introduces the concept of "preset" to the ruleset config. The preset is for naming a group of rules so that you can use the rules you need without having to configure each rule individually. The idea was inspired by ESLint's "extends": "eslint:recommended".
https://eslint.org/docs/latest/user-guide/configuring/configuration-files#extending-configuration-files
This enables all rules that were previously disabled by default, and makes all rules available if not set. If you want to enable only some rules as before, set "recommended" to preset.
For compatibility, default to adopt
preset="recommended"
if noplugin "terraform"
is declared. In other words, the rules that are enabled by default aren't much different than they used to be. However, at this time, we will review the rules that correspond to "recommended", so there may be differences in behavior.