You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2daf461
Browse filesBrowse the repository at this point in the historyBrowse files
feat: allow using both prettier and standardjs (#5679)
- Allow using both Prettier and StandardJS at the same time by removing
JAVASCRIPT_DEFAULT_STYLE and TYPESCRIPT_DEFAULT_STYLE
configuration variables. They create a confusing corner case that
Super-linter already handles with its core logic that's in place to
enable and disable linters.
- Document VALIDATE_JAVASCRIPT_PRETTIER and VALIDATE_TYPESCRIPT_PRETTIER
because they were missing from the README.
- Add missing TYPESCRIPT_PRETTIER tests.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,6 @@ You can configure super-linter using the following environment variables:
216
216
| **IGNORE_GENERATED_FILES** | `false` | If set to `true`, super-linter will ignore all the files with `@generated` marker but without `@not-generated` marker. |
217
217
| **IGNORE_GITIGNORED_FILES** | `false` | If set to `true`, super-linter will ignore all the files that are ignored by Git. |
218
218
| **JAVA_FILE_NAME** | `sun_checks.xml` | Filename for [Checkstyle configuration](https://checkstyle.sourceforge.io/config.html). Checkstyle embeds several configuration files, such as `sun_checks.xml`, `google_checks.xml` that you can use without providing your own configuration file. |
219
-
| **JAVASCRIPT_DEFAULT_STYLE** | `standard` | Flag to set the default style of JavaScript. Available options: **standard**/**prettier** |
| **JSCPD_CONFIG_FILE** | `.jscpd.json` | Filename for JSCPD configuration |
222
221
| **KUBERNETES_KUBECONFORM_OPTIONS** | `null` | Additional arguments to pass to the command-line when running **Kubernetes Kubeconform** (Example: --ignore-missing-schemas) |
@@ -254,7 +253,6 @@ You can configure super-linter using the following environment variables:
254
253
| **SUPPRESS_POSSUM** | `false` | If set to `true`, will hide the ASCII possum at top of log output. Default is `false` |
| **TYPESCRIPT_STANDARD_TSCONFIG_FILE** | `${DEFAULT_WORKSPACE}/tsconfig.json` | Path to the [TypeScript project configuration](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) in [ts-standard](https://github.com/standard/ts-standard). The path is relative to `DEFAULT_WORKSPACE` |
260
258
| **USE_FIND_ALGORITHM** | `false` | By default, we use `git diff` to find all files in the workspace and what has been updated, this would enable the Linux `find` method instead to find all files to lint |
@@ -286,6 +284,7 @@ You can configure super-linter using the following environment variables:
286
284
| **VALIDATE_HTML** | `true` | Flag to enable or disable the linting process of the HTML language. |
287
285
| **VALIDATE_JAVA** | `true` | Flag to enable or disable the linting process of the Java language. (Utilizing: checkstyle) |
288
286
| **VALIDATE_JAVASCRIPT_ES** | `true` | Flag to enable or disable the linting process of the JavaScript language. (Utilizing: ESLint) |
287
+
| **VALIDATE_JAVASCRIPT_PRETTIER** | `true` | Flag to enable or disable the linting process of the JavaScript language. (Utilizing: prettier) |
289
288
| **VALIDATE_JAVASCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the JavaScript language. (Utilizing: standard) |
290
289
| **VALIDATE_JSCPD** | `true` | Flag to enable or disable JSCPD. |
291
290
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the JSON language. |
@@ -335,6 +334,7 @@ You can configure super-linter using the following environment variables:
335
334
| **VALIDATE_TERRAGRUNT** | `true` | Flag to enable or disable the linting process for Terragrunt files. |
336
335
| **VALIDATE_TSX** | `true` | Flag to enable or disable the linting process for tsx files (Utilizing: ESLint) |
337
336
| **VALIDATE_TYPESCRIPT_ES** | `true` | Flag to enable or disable the linting process of the TypeScript language. (Utilizing: ESLint) |
337
+
| **VALIDATE_TYPESCRIPT_PRETTIER** | `true` | Flag to enable or disable the linting process of the TypeScript language. (Utilizing: prettier) |
338
338
| **VALIDATE_TYPESCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the TypeScript language. (Utilizing: ts-standard) |
339
339
| **VALIDATE_XML** | `true` | Flag to enable or disable the linting process of the XML language. |
340
340
| **VALIDATE_YAML** | `true` | Flag to enable or disable the linting process of the YAML language. |
Copy file name to clipboardExpand all lines: lib/functions/validation.sh
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -119,11 +119,12 @@ function ValidateValidationVariables() {
119
119
debug "Configuration contains at least one custom value to enable or disable linters."
120
120
if [ -z"${!VALIDATE_LANGUAGE:-}" ];then
121
121
# Flag was not set, default to:
122
-
# if ANY_TRUE then set to false
123
-
# if ANY_FALSE then set to true
122
+
#- true if the configuration provided any false value -> enable linters that the user didn't explicitly disable
123
+
#- false if the configuration didn't provid any false value -> disable linters that the user didn't explicitly enable
124
124
eval"${VALIDATE_LANGUAGE}='$ANY_FALSE'"
125
125
fi
126
126
else
127
+
# The user didn't provide and configuration value -> enable all linters by default
127
128
eval"${VALIDATE_LANGUAGE}='true'"
128
129
debug "Configuration doesn't include any custom values to enable or disable linters. Setting VALIDATE variable for ${LANGUAGE} to: ${!VALIDATE_LANGUAGE}"
129
130
fi
@@ -342,7 +343,7 @@ function WarnIfDeprecatedValueForConfigurationVariableIsSet() {
342
343
343
344
functionValidateDeprecatedVariables() {
344
345
345
-
# The following variables have been deprecated in v6
346
+
# The following variables have been deprecated in v6.0.0
0 commit comments