mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-09 02:23:39 -05:00
docs: add info about standard and prettier (#5948)
Document how to update the configuration when it includes JAVASCRIPT_DEFAULT_STYLE or TYPESCRIPT_DEFAULT_STYLE.
This commit is contained in:
parent
d9592327c6
commit
b09ac00c68
2 changed files with 49 additions and 1 deletions
|
@ -2,8 +2,56 @@
|
|||
|
||||
This document helps you upgrade from a super-linter version to newer ones:
|
||||
|
||||
- [Upgrade from v6.7.0 to v6.8.0](#upgrade-from-v670-to-v680)
|
||||
- [Upgrade from v5 to v6](#upgrade-from-v5-to-v6)
|
||||
|
||||
## Upgrade from v6.7.0 to v6.8.0
|
||||
|
||||
This section helps you upgrade from super-linter `v6.7.0` to `v6.8.0`.
|
||||
|
||||
### JAVASCRIPT_DEFAULT_STYLE and TYPESCRIPT_DEFAULT_STYLE
|
||||
|
||||
- The `JAVASCRIPT_DEFAULT_STYLE` and `TYPESCRIPT_DEFAULT_STYLE` have been
|
||||
deprecated because they made the `VALIDATE_JAVASCRIPT_PRETTIER`,
|
||||
`VALIDATE_JAVASCRIPT_STANDARD`, `VALIDATE_TYPESCRIPT_PRETTIER`, and
|
||||
`VALIDATE_TYPESCRIPT_STANDARD` configuration variables break the documented
|
||||
behavior of how
|
||||
[`VALIDATE_xxx` variables work](https://github.com/super-linter/super-linter?tab=readme-ov-file#configure-super-linter).
|
||||
Unfortunately, a transparent configuration update is not feasible without
|
||||
complicating the codebase to address all possible cases. If you only want to
|
||||
run only one between Prettier and Standard, a possible migration strategy
|
||||
could be:
|
||||
|
||||
- If you're explicitly enabling linters and formatters that you want
|
||||
Super-linter to run by setting `VALIDATE_xxxx` variables to `true`:
|
||||
|
||||
- If you set `JAVASCRIPT_DEFAULT_STYLE=standard`, set
|
||||
`VALIDATE_JAVASCRIPT_STANDARD=true`
|
||||
- If you set `TYPESCRIPT_DEFAULT_STYLE=standard`, set
|
||||
`VALIDATE_TYPESCRIPT_STANDARD=true`
|
||||
- If you set `JAVASCRIPT_DEFAULT_STYLE=prettier`, set
|
||||
`VALIDATE_JAVASCRIPT_PRETTIER=true`
|
||||
- If you set `TYPESCRIPT_DEFAULT_STYLE=prettier`, set
|
||||
`VALIDATE_TYPESCRIPT_PRETTIER=true`
|
||||
|
||||
- If you're explicitly disabling linters and formatters that you don't want
|
||||
Super-linter to run by setting `VALIDATE_xxxx` variables to `false`:
|
||||
|
||||
- If you set `JAVASCRIPT_DEFAULT_STYLE=standard`, set
|
||||
`VALIDATE_JAVASCRIPT_PRETTIER=false`
|
||||
|
||||
- If you set `TYPESCRIPT_DEFAULT_STYLE=standard`, set
|
||||
`VALIDATE_TYPESCRIPT_PRETTIER=false`
|
||||
|
||||
- If you set `JAVASCRIPT_DEFAULT_STYLE=prettier`, set
|
||||
`VALIDATE_JAVASCRIPT_STANDARD=false`
|
||||
|
||||
- If you set `TYPESCRIPT_DEFAULT_STYLE=prettier`, set
|
||||
`VALIDATE_TYPESCRIPT_STANDARD=false`
|
||||
|
||||
Finally, you remove both `JAVASCRIPT_DEFAULT_STYLE` and
|
||||
`TYPESCRIPT_DEFAULT_STYLE` from your Super-linter configuration.
|
||||
|
||||
## Upgrade from v5 to v6
|
||||
|
||||
This section helps you upgrade from super-linter `v5` to `v6`.
|
||||
|
|
|
@ -351,7 +351,7 @@ function ValidateDeprecatedVariables() {
|
|||
WarnIfDeprecatedValueForConfigurationVariableIsSet "${LOG_LEVEL}" "TRACE" "LOG_LEVEL" "DEBUG"
|
||||
WarnIfDeprecatedValueForConfigurationVariableIsSet "${LOG_LEVEL}" "VERBOSE" "LOG_LEVEL" "INFO"
|
||||
|
||||
# The following variables have been deprecated in v7.0.0
|
||||
# The following variables have been deprecated in v6.8.0
|
||||
WarnIfVariableIsSet "${JAVASCRIPT_DEFAULT_STYLE:-}" "JAVASCRIPT_DEFAULT_STYLE"
|
||||
WarnIfVariableIsSet "${TYPESCRIPT_DEFAULT_STYLE:-}" "TYPESCRIPT_DEFAULT_STYLE"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue