mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-12 12:00:03 -05:00
feat: prettier for additional languages (#6025)
- CSS, Sass, SCSS - HTML - JSON - JSX - GraphQL - Vue - YAML
This commit is contained in:
parent
1080af3933
commit
1d12a31fce
30 changed files with 406 additions and 12 deletions
1
.github/linters/.jscpd.json
vendored
1
.github/linters/.jscpd.json
vendored
|
@ -10,6 +10,7 @@
|
||||||
"**/test/linters/cloudformation",
|
"**/test/linters/cloudformation",
|
||||||
"**/test/linters/coffeescript",
|
"**/test/linters/coffeescript",
|
||||||
"**/test/linters/css",
|
"**/test/linters/css",
|
||||||
|
"**/test/linters/css_prettier",
|
||||||
"**/test/linters/html",
|
"**/test/linters/html",
|
||||||
"**/test/linters/javascript_es",
|
"**/test/linters/javascript_es",
|
||||||
"**/test/linters/javascript_prettier",
|
"**/test/linters/javascript_prettier",
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -260,8 +260,12 @@ fix-codebase: ## Fix and format the entire codebase
|
||||||
-e FIX_JAVASCRIPT_ES=true \
|
-e FIX_JAVASCRIPT_ES=true \
|
||||||
-e FIX_JAVASCRIPT_PRETTIER=true \
|
-e FIX_JAVASCRIPT_PRETTIER=true \
|
||||||
-e FIX_JSON=true \
|
-e FIX_JSON=true \
|
||||||
|
-e FIX_JSON_PRETTIER=true \
|
||||||
-e FIX_MARKDOWN=true \
|
-e FIX_MARKDOWN=true \
|
||||||
|
-e FIX_MARKDOWN_PRETTIER=true \
|
||||||
|
-e FIX_NATURAL_LANGUAGE=true \
|
||||||
-e FIX_SHELL_SHFMT=true \
|
-e FIX_SHELL_SHFMT=true \
|
||||||
|
-e FIX_YAML_PRETTIER=true \
|
||||||
-e GITLEAKS_CONFIG_FILE=".gitleaks-ignore-tests.toml" \
|
-e GITLEAKS_CONFIG_FILE=".gitleaks-ignore-tests.toml" \
|
||||||
-e LOG_LEVEL=DEBUG \
|
-e LOG_LEVEL=DEBUG \
|
||||||
-e RUN_LOCAL=true \
|
-e RUN_LOCAL=true \
|
||||||
|
|
|
@ -347,6 +347,7 @@ BuildFileArrays() {
|
||||||
elif [ "${FILE_TYPE}" == "css" ] || [ "${FILE_TYPE}" == "scss" ] ||
|
elif [ "${FILE_TYPE}" == "css" ] || [ "${FILE_TYPE}" == "scss" ] ||
|
||||||
[ "${FILE_TYPE}" == "sass" ]; then
|
[ "${FILE_TYPE}" == "sass" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CSS"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CSS"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CSS_PRETTIER"
|
||||||
elif [ "${FILE_TYPE}" == "dart" ]; then
|
elif [ "${FILE_TYPE}" == "dart" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-DART"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-DART"
|
||||||
# Use BASE_FILE here because FILE_TYPE is not reliable when there is no file extension
|
# Use BASE_FILE here because FILE_TYPE is not reliable when there is no file extension
|
||||||
|
@ -402,6 +403,7 @@ BuildFileArrays() {
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GROOVY"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GROOVY"
|
||||||
elif [ "${FILE_TYPE}" == "html" ]; then
|
elif [ "${FILE_TYPE}" == "html" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-HTML"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-HTML"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-HTML_PRETTIER"
|
||||||
elif [ "${FILE_TYPE}" == "java" ]; then
|
elif [ "${FILE_TYPE}" == "java" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JAVA"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JAVA"
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GOOGLE_JAVA_FORMAT"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GOOGLE_JAVA_FORMAT"
|
||||||
|
@ -413,6 +415,7 @@ BuildFileArrays() {
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSONC"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSONC"
|
||||||
elif [ "${FILE_TYPE}" == "json" ]; then
|
elif [ "${FILE_TYPE}" == "json" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSON"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSON"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSON_PRETTIER"
|
||||||
if DetectOpenAPIFile "${FILE}"; then
|
if DetectOpenAPIFile "${FILE}"; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-OPENAPI"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-OPENAPI"
|
||||||
fi
|
fi
|
||||||
|
@ -430,6 +433,7 @@ BuildFileArrays() {
|
||||||
fi
|
fi
|
||||||
elif [ "${FILE_TYPE}" == "jsx" ]; then
|
elif [ "${FILE_TYPE}" == "jsx" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSX"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSX"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSX_PRETTIER"
|
||||||
elif [ "${FILE_TYPE}" == "kt" ] || [ "${FILE_TYPE}" == "kts" ]; then
|
elif [ "${FILE_TYPE}" == "kt" ] || [ "${FILE_TYPE}" == "kts" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-KOTLIN"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-KOTLIN"
|
||||||
elif [ "$FILE_TYPE" == "lua" ]; then
|
elif [ "$FILE_TYPE" == "lua" ]; then
|
||||||
|
@ -438,6 +442,7 @@ BuildFileArrays() {
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-LATEX"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-LATEX"
|
||||||
elif [ "${FILE_TYPE}" == "md" ]; then
|
elif [ "${FILE_TYPE}" == "md" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-MARKDOWN"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-MARKDOWN"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-MARKDOWN_PRETTIER"
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-NATURAL_LANGUAGE"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-NATURAL_LANGUAGE"
|
||||||
elif [ "${FILE_TYPE}" == "php" ]; then
|
elif [ "${FILE_TYPE}" == "php" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_BUILTIN"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_BUILTIN"
|
||||||
|
@ -508,8 +513,13 @@ BuildFileArrays() {
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-XML"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-XML"
|
||||||
elif [[ "${FILE}" =~ .?goreleaser.+ya?ml ]]; then
|
elif [[ "${FILE}" =~ .?goreleaser.+ya?ml ]]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GO_RELEASER"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GO_RELEASER"
|
||||||
|
elif [ "${FILE_TYPE}" == "graphql" ]; then
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GRAPHQL_PRETTIER"
|
||||||
|
elif [ "${FILE_TYPE}" == "vue" ]; then
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-VUE_PRETTIER"
|
||||||
elif [ "${FILE_TYPE}" == "yml" ] || [ "${FILE_TYPE}" == "yaml" ]; then
|
elif [ "${FILE_TYPE}" == "yml" ] || [ "${FILE_TYPE}" == "yaml" ]; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-YAML"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-YAML"
|
||||||
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-YAML_PRETTIER"
|
||||||
if DetectActions "${FILE}"; then
|
if DetectActions "${FILE}"; then
|
||||||
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GITHUB_ACTIONS"
|
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GITHUB_ACTIONS"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -12,6 +12,9 @@ source /action/lib/globals/linterCommandsOptions.sh
|
||||||
# Define linter commands #
|
# Define linter commands #
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
|
# These commands are reused across several languages
|
||||||
|
PRETTIER_COMMAND=(prettier)
|
||||||
|
|
||||||
LINTER_COMMANDS_ARRAY_ANSIBLE=(ansible-lint -c "${ANSIBLE_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_ANSIBLE=(ansible-lint -c "${ANSIBLE_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_ARM=(pwsh -NoProfile -NoLogo -Command "\"Import-Module ${ARM_TTK_PSD1} ; \\\${config} = \\\$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath '{}'; if (\\\${Error}.Count) { exit 1 }\"")
|
LINTER_COMMANDS_ARRAY_ARM=(pwsh -NoProfile -NoLogo -Command "\"Import-Module ${ARM_TTK_PSD1} ; \\\${config} = \\\$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath '{}'; if (\\\${Error}.Count) { exit 1 }\"")
|
||||||
LINTER_COMMANDS_ARRAY_BASH=(shellcheck --color --rcfile "${BASH_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_BASH=(shellcheck --color --rcfile "${BASH_LINTER_RULES}")
|
||||||
|
@ -43,6 +46,7 @@ LINTER_COMMANDS_ARRAY_COFFEESCRIPT=(coffeelint -f "${COFFEESCRIPT_LINTER_RULES}"
|
||||||
LINTER_COMMANDS_ARRAY_CPP=(cpplint)
|
LINTER_COMMANDS_ARRAY_CPP=(cpplint)
|
||||||
LINTER_COMMANDS_ARRAY_CSHARP=(dotnet format whitespace --folder --exclude / --include "{/}")
|
LINTER_COMMANDS_ARRAY_CSHARP=(dotnet format whitespace --folder --exclude / --include "{/}")
|
||||||
LINTER_COMMANDS_ARRAY_CSS=(stylelint --config "${CSS_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_CSS=(stylelint --config "${CSS_LINTER_RULES}")
|
||||||
|
LINTER_COMMANDS_ARRAY_CSS_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_DART=(dart analyze --fatal-infos --fatal-warnings)
|
LINTER_COMMANDS_ARRAY_DART=(dart analyze --fatal-infos --fatal-warnings)
|
||||||
LINTER_COMMANDS_ARRAY_DOCKERFILE_HADOLINT=(hadolint -c "${DOCKERFILE_HADOLINT_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_DOCKERFILE_HADOLINT=(hadolint -c "${DOCKERFILE_HADOLINT_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_EDITORCONFIG=(editorconfig-checker -config "${EDITORCONFIG_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_EDITORCONFIG=(editorconfig-checker -config "${EDITORCONFIG_LINTER_RULES}")
|
||||||
|
@ -64,11 +68,13 @@ LINTER_COMMANDS_ARRAY_GO=(golangci-lint run -c "${GO_LINTER_RULES}" --fast)
|
||||||
LINTER_COMMANDS_ARRAY_GO_MODULES=(golangci-lint run --allow-parallel-runners -c "${GO_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_GO_MODULES=(golangci-lint run --allow-parallel-runners -c "${GO_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_GO_RELEASER=(goreleaser check)
|
LINTER_COMMANDS_ARRAY_GO_RELEASER=(goreleaser check)
|
||||||
LINTER_COMMANDS_ARRAY_GOOGLE_JAVA_FORMAT=(java -jar /usr/bin/google-java-format)
|
LINTER_COMMANDS_ARRAY_GOOGLE_JAVA_FORMAT=(java -jar /usr/bin/google-java-format)
|
||||||
|
LINTER_COMMANDS_ARRAY_GRAPHQL_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_GROOVY=(npm-groovy-lint -c "${GROOVY_LINTER_RULES}" --failon warning --no-insight)
|
LINTER_COMMANDS_ARRAY_GROOVY=(npm-groovy-lint -c "${GROOVY_LINTER_RULES}" --failon warning --no-insight)
|
||||||
LINTER_COMMANDS_ARRAY_HTML=(htmlhint --config "${HTML_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_HTML=(htmlhint --config "${HTML_LINTER_RULES}")
|
||||||
|
LINTER_COMMANDS_ARRAY_HTML_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_JAVA=(java -jar /usr/bin/checkstyle -c "${JAVA_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_JAVA=(java -jar /usr/bin/checkstyle -c "${JAVA_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_JAVASCRIPT_ES=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_JAVASCRIPT_ES=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_JAVASCRIPT_PRETTIER=(prettier)
|
LINTER_COMMANDS_ARRAY_JAVASCRIPT_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_JAVASCRIPT_STANDARD=(standard "${JAVASCRIPT_STANDARD_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_JAVASCRIPT_STANDARD=(standard "${JAVASCRIPT_STANDARD_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_JSCPD=(jscpd --config "${JSCPD_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_JSCPD=(jscpd --config "${JSCPD_LINTER_RULES}")
|
||||||
JSCPD_GITIGNORE_OPTION="--gitignore"
|
JSCPD_GITIGNORE_OPTION="--gitignore"
|
||||||
|
@ -79,8 +85,10 @@ if [[ "${IGNORE_GITIGNORED_FILES}" == "true" ]]; then
|
||||||
LINTER_COMMANDS_ARRAY_JSCPD+=("${JSCPD_GITIGNORE_OPTION}")
|
LINTER_COMMANDS_ARRAY_JSCPD+=("${JSCPD_GITIGNORE_OPTION}")
|
||||||
fi
|
fi
|
||||||
LINTER_COMMANDS_ARRAY_JSON=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}" --ext '.json')
|
LINTER_COMMANDS_ARRAY_JSON=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}" --ext '.json')
|
||||||
|
LINTER_COMMANDS_ARRAY_JSON_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_JSONC=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}" --ext '.json5,.jsonc')
|
LINTER_COMMANDS_ARRAY_JSONC=(eslint -c "${JAVASCRIPT_ES_LINTER_RULES}" --ext '.json5,.jsonc')
|
||||||
LINTER_COMMANDS_ARRAY_JSX=(eslint -c "${JSX_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_JSX=(eslint -c "${JSX_LINTER_RULES}")
|
||||||
|
LINTER_COMMANDS_ARRAY_JSX_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_KOTLIN=(ktlint "{/}")
|
LINTER_COMMANDS_ARRAY_KOTLIN=(ktlint "{/}")
|
||||||
LINTER_COMMANDS_ARRAY_KUBERNETES_KUBECONFORM=(kubeconform -strict)
|
LINTER_COMMANDS_ARRAY_KUBERNETES_KUBECONFORM=(kubeconform -strict)
|
||||||
if [ "${KUBERNETES_KUBECONFORM_OPTIONS}" != "null" ] && [ -n "${KUBERNETES_KUBECONFORM_OPTIONS}" ]; then
|
if [ "${KUBERNETES_KUBECONFORM_OPTIONS}" != "null" ] && [ -n "${KUBERNETES_KUBECONFORM_OPTIONS}" ]; then
|
||||||
|
@ -100,6 +108,7 @@ if [ -n "${MARKDOWN_CUSTOM_RULE_GLOBS}" ]; then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
LINTER_COMMANDS_ARRAY_MARKDOWN_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_NATURAL_LANGUAGE=(textlint -c "${NATURAL_LANGUAGE_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_NATURAL_LANGUAGE=(textlint -c "${NATURAL_LANGUAGE_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_OPENAPI=(spectral lint -r "${OPENAPI_LINTER_RULES}" -D)
|
LINTER_COMMANDS_ARRAY_OPENAPI=(spectral lint -r "${OPENAPI_LINTER_RULES}" -D)
|
||||||
LINTER_COMMANDS_ARRAY_PERL=(perlcritic)
|
LINTER_COMMANDS_ARRAY_PERL=(perlcritic)
|
||||||
|
@ -140,13 +149,15 @@ LINTER_COMMANDS_ARRAY_TERRAFORM_TERRASCAN=(terrascan scan -i terraform -t all -c
|
||||||
LINTER_COMMANDS_ARRAY_TERRAGRUNT=(terragrunt hclfmt --terragrunt-check --terragrunt-log-level error --terragrunt-hclfmt-file)
|
LINTER_COMMANDS_ARRAY_TERRAGRUNT=(terragrunt hclfmt --terragrunt-check --terragrunt-log-level error --terragrunt-hclfmt-file)
|
||||||
LINTER_COMMANDS_ARRAY_TSX=(eslint -c "${TSX_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_TSX=(eslint -c "${TSX_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_TYPESCRIPT_ES=(eslint -c "${TYPESCRIPT_ES_LINTER_RULES}")
|
LINTER_COMMANDS_ARRAY_TYPESCRIPT_ES=(eslint -c "${TYPESCRIPT_ES_LINTER_RULES}")
|
||||||
LINTER_COMMANDS_ARRAY_TYPESCRIPT_PRETTIER=(prettier)
|
LINTER_COMMANDS_ARRAY_TYPESCRIPT_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_TYPESCRIPT_STANDARD=(ts-standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin --project "${TYPESCRIPT_STANDARD_TSCONFIG_FILE}")
|
LINTER_COMMANDS_ARRAY_TYPESCRIPT_STANDARD=(ts-standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin --project "${TYPESCRIPT_STANDARD_TSCONFIG_FILE}")
|
||||||
|
LINTER_COMMANDS_ARRAY_VUE_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
LINTER_COMMANDS_ARRAY_XML=(xmllint)
|
LINTER_COMMANDS_ARRAY_XML=(xmllint)
|
||||||
LINTER_COMMANDS_ARRAY_YAML=(yamllint -c "${YAML_LINTER_RULES}" -f parsable)
|
LINTER_COMMANDS_ARRAY_YAML=(yamllint -c "${YAML_LINTER_RULES}" -f parsable)
|
||||||
if [ "${YAML_ERROR_ON_WARNING}" == 'true' ]; then
|
if [ "${YAML_ERROR_ON_WARNING}" == 'true' ]; then
|
||||||
LINTER_COMMANDS_ARRAY_YAML+=(--strict)
|
LINTER_COMMANDS_ARRAY_YAML+=(--strict)
|
||||||
fi
|
fi
|
||||||
|
LINTER_COMMANDS_ARRAY_YAML_PRETTIER=("${PRETTIER_COMMAND[@]}")
|
||||||
|
|
||||||
function InitFixModeOptionsAndCommands() {
|
function InitFixModeOptionsAndCommands() {
|
||||||
local LANGUAGE="${1}"
|
local LANGUAGE="${1}"
|
||||||
|
|
|
@ -2,11 +2,24 @@
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CHECKOV' 'CLANG_FORMAT'
|
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CHECKOV' 'CLANG_FORMAT'
|
||||||
'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CPP' 'CSHARP' 'CSS' 'DART'
|
'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CPP' 'CSHARP'
|
||||||
'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GITHUB_ACTIONS'
|
'CSS'
|
||||||
'GITLEAKS' 'GHERKIN' 'GO' 'GO_MODULES' 'GO_RELEASER' 'GOOGLE_JAVA_FORMAT' 'GROOVY' 'HTML' 'JAVA'
|
"CSS_PRETTIER"
|
||||||
'JAVASCRIPT_ES' 'JAVASCRIPT_PRETTIER' 'JAVASCRIPT_STANDARD' 'JSCPD' 'JSON' 'JSONC' 'JSX'
|
'DART'
|
||||||
|
'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV'
|
||||||
|
'GITHUB_ACTIONS'
|
||||||
|
'GITLEAKS' 'GHERKIN' 'GO' 'GO_MODULES' 'GO_RELEASER' 'GOOGLE_JAVA_FORMAT'
|
||||||
|
"GRAPHQL_PRETTIER"
|
||||||
|
'GROOVY'
|
||||||
|
'HTML'
|
||||||
|
"HTML_PRETTIER"
|
||||||
|
'JAVA'
|
||||||
|
'JAVASCRIPT_ES' 'JAVASCRIPT_PRETTIER' 'JAVASCRIPT_STANDARD' 'JSCPD' 'JSON'
|
||||||
|
"JSON_PRETTIER"
|
||||||
|
'JSONC' 'JSX'
|
||||||
|
"JSX_PRETTIER"
|
||||||
'KUBERNETES_KUBECONFORM' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN'
|
'KUBERNETES_KUBECONFORM' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN'
|
||||||
|
"MARKDOWN_PRETTIER"
|
||||||
'NATURAL_LANGUAGE' 'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' 'PHP_PHPSTAN'
|
'NATURAL_LANGUAGE' 'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' 'PHP_PHPSTAN'
|
||||||
'PHP_PSALM' 'POWERSHELL' 'PROTOBUF' 'PYTHON_BLACK' 'PYTHON_PYLINT'
|
'PHP_PSALM' 'POWERSHELL' 'PROTOBUF' 'PYTHON_BLACK' 'PYTHON_PYLINT'
|
||||||
'PYTHON_FLAKE8' 'PYTHON_ISORT' 'PYTHON_MYPY' 'PYTHON_RUFF'
|
'PYTHON_FLAKE8' 'PYTHON_ISORT' 'PYTHON_MYPY' 'PYTHON_RUFF'
|
||||||
|
@ -14,6 +27,10 @@ LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CHECKOV' 'CLANG_FORMAT'
|
||||||
'RUST_2018' 'RUST_2021' 'RUST_CLIPPY' 'SCALAFMT' 'SHELL_SHFMT'
|
'RUST_2018' 'RUST_2021' 'RUST_CLIPPY' 'SCALAFMT' 'SHELL_SHFMT'
|
||||||
'SNAKEMAKE_LINT' 'SNAKEMAKE_SNAKEFMT' 'STATES' 'SQLFLUFF' 'TEKTON'
|
'SNAKEMAKE_LINT' 'SNAKEMAKE_SNAKEFMT' 'STATES' 'SQLFLUFF' 'TEKTON'
|
||||||
'TERRAFORM_FMT' 'TERRAFORM_TFLINT' 'TERRAFORM_TERRASCAN' 'TERRAGRUNT' 'TSX'
|
'TERRAFORM_FMT' 'TERRAFORM_TFLINT' 'TERRAFORM_TERRASCAN' 'TERRAGRUNT' 'TSX'
|
||||||
'TYPESCRIPT_ES' 'TYPESCRIPT_PRETTIER' 'TYPESCRIPT_STANDARD' 'XML' 'YAML')
|
'TYPESCRIPT_ES' 'TYPESCRIPT_PRETTIER' 'TYPESCRIPT_STANDARD'
|
||||||
|
"VUE_PRETTIER"
|
||||||
|
'XML' 'YAML'
|
||||||
|
"YAML_PRETTIER"
|
||||||
|
)
|
||||||
|
|
||||||
LANGUAGE_ARRAY_FOR_LINTER_RULES=("${LANGUAGE_ARRAY[@]}" "TYPESCRIPT_STANDARD_TSCONFIG")
|
LANGUAGE_ARRAY_FOR_LINTER_RULES=("${LANGUAGE_ARRAY[@]}" "TYPESCRIPT_STANDARD_TSCONFIG")
|
||||||
|
|
|
@ -12,8 +12,14 @@ RUSTFMT_CHECK_ONLY_MODE_OPTIONS=(--check)
|
||||||
# need to define a "check only" mode option for those.
|
# need to define a "check only" mode option for those.
|
||||||
CLANG_FORMAT_CHECK_ONLY_MODE_OPTIONS=(--dry-run)
|
CLANG_FORMAT_CHECK_ONLY_MODE_OPTIONS=(--dry-run)
|
||||||
CSHARP_CHECK_ONLY_MODE_OPTIONS=(--verify-no-changes)
|
CSHARP_CHECK_ONLY_MODE_OPTIONS=(--verify-no-changes)
|
||||||
|
CSS_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
GOOGLE_JAVA_FORMAT_CHECK_ONLY_MODE_OPTIONS=(--dry-run --set-exit-if-changed)
|
GOOGLE_JAVA_FORMAT_CHECK_ONLY_MODE_OPTIONS=(--dry-run --set-exit-if-changed)
|
||||||
|
GRAPHQL_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
HTML_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
JAVASCRIPT_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
JAVASCRIPT_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
JSON_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
JSX_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
MARKDOWN_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
PYTHON_BLACK_CHECK_ONLY_MODE_OPTIONS=(--diff --check)
|
PYTHON_BLACK_CHECK_ONLY_MODE_OPTIONS=(--diff --check)
|
||||||
PYTHON_ISORT_CHECK_ONLY_MODE_OPTIONS=(--diff --check)
|
PYTHON_ISORT_CHECK_ONLY_MODE_OPTIONS=(--diff --check)
|
||||||
RUST_2015_CHECK_ONLY_MODE_OPTIONS=("${RUSTFMT_CHECK_ONLY_MODE_OPTIONS[@]}")
|
RUST_2015_CHECK_ONLY_MODE_OPTIONS=("${RUSTFMT_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
@ -25,6 +31,8 @@ SNAKEMAKE_SNAKEFMT_CHECK_ONLY_MODE_OPTIONS=(--check --compact-diff)
|
||||||
SQLFLUFF_CHECK_ONLY_MODE_OPTIONS=(lint)
|
SQLFLUFF_CHECK_ONLY_MODE_OPTIONS=(lint)
|
||||||
TERRAFORM_FMT_CHECK_ONLY_MODE_OPTIONS=(-check -diff)
|
TERRAFORM_FMT_CHECK_ONLY_MODE_OPTIONS=(-check -diff)
|
||||||
TYPESCRIPT_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
TYPESCRIPT_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
VUE_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
YAML_PRETTIER_CHECK_ONLY_MODE_OPTIONS=("${PRETTIER_CHECK_ONLY_MODE_OPTIONS[@]}")
|
||||||
|
|
||||||
# Fix mode options for linters that that we reuse across several languages
|
# Fix mode options for linters that that we reuse across several languages
|
||||||
ESLINT_FIX_MODE_OPTIONS=(--fix)
|
ESLINT_FIX_MODE_OPTIONS=(--fix)
|
||||||
|
@ -37,18 +45,24 @@ STANDARD_FIX_MODE_OPTIONS=(--fix)
|
||||||
ANSIBLE_FIX_MODE_OPTIONS=(--fix)
|
ANSIBLE_FIX_MODE_OPTIONS=(--fix)
|
||||||
CLANG_FORMAT_FIX_MODE_OPTIONS=(-i)
|
CLANG_FORMAT_FIX_MODE_OPTIONS=(-i)
|
||||||
CSS_FIX_MODE_OPTIONS=(--fix)
|
CSS_FIX_MODE_OPTIONS=(--fix)
|
||||||
|
CSS_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
ENV_FIX_MODE_OPTIONS=(fix --no-backup)
|
ENV_FIX_MODE_OPTIONS=(fix --no-backup)
|
||||||
GO_FIX_MODE_OPTIONS=("${GOLANGCI_LINT_FIX_MODE_OPTIONS[@]}")
|
GO_FIX_MODE_OPTIONS=("${GOLANGCI_LINT_FIX_MODE_OPTIONS[@]}")
|
||||||
GO_MODULES_FIX_MODE_OPTIONS=("${GOLANGCI_LINT_FIX_MODE_OPTIONS[@]}")
|
GO_MODULES_FIX_MODE_OPTIONS=("${GOLANGCI_LINT_FIX_MODE_OPTIONS[@]}")
|
||||||
GOOGLE_JAVA_FORMAT_FIX_MODE_OPTIONS=(--replace)
|
GOOGLE_JAVA_FORMAT_FIX_MODE_OPTIONS=(--replace)
|
||||||
|
GRAPHQL_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
GROOVY_FIX_MODE_OPTIONS=(--fix)
|
GROOVY_FIX_MODE_OPTIONS=(--fix)
|
||||||
|
HTML_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
JAVASCRIPT_ES_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
JAVASCRIPT_ES_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
JAVASCRIPT_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
JAVASCRIPT_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
JAVASCRIPT_STANDARD_FIX_MODE_OPTIONS=("${STANDARD_FIX_MODE_OPTIONS[@]}")
|
JAVASCRIPT_STANDARD_FIX_MODE_OPTIONS=("${STANDARD_FIX_MODE_OPTIONS[@]}")
|
||||||
JSON_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
JSON_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
|
JSON_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
JSONC_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
JSONC_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
JSX_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
JSX_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
|
JSX_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
MARKDOWN_FIX_MODE_OPTIONS=(--fix)
|
MARKDOWN_FIX_MODE_OPTIONS=(--fix)
|
||||||
|
MARKDOWN_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
NATURAL_LANGUAGE_FIX_MODE_OPTIONS=(--fix)
|
NATURAL_LANGUAGE_FIX_MODE_OPTIONS=(--fix)
|
||||||
POWERSHELL_FIX_MODE_OPTIONS=(-Fix)
|
POWERSHELL_FIX_MODE_OPTIONS=(-Fix)
|
||||||
PROTOBUF_FIX_MODE_OPTIONS=(-fix)
|
PROTOBUF_FIX_MODE_OPTIONS=(-fix)
|
||||||
|
@ -62,6 +76,8 @@ TSX_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
TYPESCRIPT_ES_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
TYPESCRIPT_ES_FIX_MODE_OPTIONS=("${ESLINT_FIX_MODE_OPTIONS[@]}")
|
||||||
TYPESCRIPT_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
TYPESCRIPT_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
TYPESCRIPT_STANDARD_FIX_MODE_OPTIONS=("${STANDARD_FIX_MODE_OPTIONS[@]}")
|
TYPESCRIPT_STANDARD_FIX_MODE_OPTIONS=("${STANDARD_FIX_MODE_OPTIONS[@]}")
|
||||||
|
VUE_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
|
YAML_PRETTIER_FIX_MODE_OPTIONS=("${PRETTIER_FIX_MODE_OPTIONS[@]}")
|
||||||
|
|
||||||
# sqlfluff is a special case because it needs a different subcommand and
|
# sqlfluff is a special case because it needs a different subcommand and
|
||||||
# subcommand options
|
# subcommand options
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
| COFFEESCRIPT | Fail ❌ |
|
| COFFEESCRIPT | Fail ❌ |
|
||||||
| CPP | Fail ❌ |
|
| CPP | Fail ❌ |
|
||||||
| CSS | Fail ❌ |
|
| CSS | Fail ❌ |
|
||||||
|
| CSS_PRETTIER | Fail ❌ |
|
||||||
| DART | Fail ❌ |
|
| DART | Fail ❌ |
|
||||||
| DOCKERFILE_HADOLINT | Fail ❌ |
|
| DOCKERFILE_HADOLINT | Fail ❌ |
|
||||||
| EDITORCONFIG | Fail ❌ |
|
| EDITORCONFIG | Fail ❌ |
|
||||||
|
@ -24,21 +25,26 @@
|
||||||
| GO_MODULES | Fail ❌ |
|
| GO_MODULES | Fail ❌ |
|
||||||
| GO_RELEASER | Fail ❌ |
|
| GO_RELEASER | Fail ❌ |
|
||||||
| GOOGLE_JAVA_FORMAT | Fail ❌ |
|
| GOOGLE_JAVA_FORMAT | Fail ❌ |
|
||||||
|
| GRAPHQL_PRETTIER | Fail ❌ |
|
||||||
| GROOVY | Fail ❌ |
|
| GROOVY | Fail ❌ |
|
||||||
| HTML | Fail ❌ |
|
| HTML | Fail ❌ |
|
||||||
|
| HTML_PRETTIER | Fail ❌ |
|
||||||
| JAVA | Fail ❌ |
|
| JAVA | Fail ❌ |
|
||||||
| JAVASCRIPT_ES | Fail ❌ |
|
| JAVASCRIPT_ES | Fail ❌ |
|
||||||
| JAVASCRIPT_PRETTIER | Fail ❌ |
|
| JAVASCRIPT_PRETTIER | Fail ❌ |
|
||||||
| JAVASCRIPT_STANDARD | Fail ❌ |
|
| JAVASCRIPT_STANDARD | Fail ❌ |
|
||||||
| JSCPD | Fail ❌ |
|
| JSCPD | Fail ❌ |
|
||||||
| JSON | Fail ❌ |
|
| JSON | Fail ❌ |
|
||||||
|
| JSON_PRETTIER | Fail ❌ |
|
||||||
| JSONC | Fail ❌ |
|
| JSONC | Fail ❌ |
|
||||||
| JSX | Fail ❌ |
|
| JSX | Fail ❌ |
|
||||||
|
| JSX_PRETTIER | Fail ❌ |
|
||||||
| KUBERNETES_KUBECONFORM | Fail ❌ |
|
| KUBERNETES_KUBECONFORM | Fail ❌ |
|
||||||
| KOTLIN | Fail ❌ |
|
| KOTLIN | Fail ❌ |
|
||||||
| LATEX | Fail ❌ |
|
| LATEX | Fail ❌ |
|
||||||
| LUA | Fail ❌ |
|
| LUA | Fail ❌ |
|
||||||
| MARKDOWN | Fail ❌ |
|
| MARKDOWN | Fail ❌ |
|
||||||
|
| MARKDOWN_PRETTIER | Fail ❌ |
|
||||||
| NATURAL_LANGUAGE | Fail ❌ |
|
| NATURAL_LANGUAGE | Fail ❌ |
|
||||||
| OPENAPI | Fail ❌ |
|
| OPENAPI | Fail ❌ |
|
||||||
| PERL | Fail ❌ |
|
| PERL | Fail ❌ |
|
||||||
|
@ -72,8 +78,10 @@
|
||||||
| TYPESCRIPT_ES | Fail ❌ |
|
| TYPESCRIPT_ES | Fail ❌ |
|
||||||
| TYPESCRIPT_PRETTIER | Fail ❌ |
|
| TYPESCRIPT_PRETTIER | Fail ❌ |
|
||||||
| TYPESCRIPT_STANDARD | Fail ❌ |
|
| TYPESCRIPT_STANDARD | Fail ❌ |
|
||||||
|
| VUE_PRETTIER | Fail ❌ |
|
||||||
| XML | Fail ❌ |
|
| XML | Fail ❌ |
|
||||||
| YAML | Fail ❌ |
|
| YAML | Fail ❌ |
|
||||||
|
| YAML_PRETTIER | Fail ❌ |
|
||||||
<!-- textlint-enable terminology -->
|
<!-- textlint-enable terminology -->
|
||||||
|
|
||||||
Super-linter detected linting errors
|
Super-linter detected linting errors
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
| CPP | Fail ❌ |
|
| CPP | Fail ❌ |
|
||||||
| CSHARP | Fail ❌ |
|
| CSHARP | Fail ❌ |
|
||||||
| CSS | Fail ❌ |
|
| CSS | Fail ❌ |
|
||||||
|
| CSS_PRETTIER | Fail ❌ |
|
||||||
| DART | Fail ❌ |
|
| DART | Fail ❌ |
|
||||||
| DOCKERFILE_HADOLINT | Fail ❌ |
|
| DOCKERFILE_HADOLINT | Fail ❌ |
|
||||||
| EDITORCONFIG | Fail ❌ |
|
| EDITORCONFIG | Fail ❌ |
|
||||||
|
@ -26,21 +27,26 @@
|
||||||
| GO_MODULES | Fail ❌ |
|
| GO_MODULES | Fail ❌ |
|
||||||
| GO_RELEASER | Fail ❌ |
|
| GO_RELEASER | Fail ❌ |
|
||||||
| GOOGLE_JAVA_FORMAT | Fail ❌ |
|
| GOOGLE_JAVA_FORMAT | Fail ❌ |
|
||||||
|
| GRAPHQL_PRETTIER | Fail ❌ |
|
||||||
| GROOVY | Fail ❌ |
|
| GROOVY | Fail ❌ |
|
||||||
| HTML | Fail ❌ |
|
| HTML | Fail ❌ |
|
||||||
|
| HTML_PRETTIER | Fail ❌ |
|
||||||
| JAVA | Fail ❌ |
|
| JAVA | Fail ❌ |
|
||||||
| JAVASCRIPT_ES | Fail ❌ |
|
| JAVASCRIPT_ES | Fail ❌ |
|
||||||
| JAVASCRIPT_PRETTIER | Fail ❌ |
|
| JAVASCRIPT_PRETTIER | Fail ❌ |
|
||||||
| JAVASCRIPT_STANDARD | Fail ❌ |
|
| JAVASCRIPT_STANDARD | Fail ❌ |
|
||||||
| JSCPD | Fail ❌ |
|
| JSCPD | Fail ❌ |
|
||||||
| JSON | Fail ❌ |
|
| JSON | Fail ❌ |
|
||||||
|
| JSON_PRETTIER | Fail ❌ |
|
||||||
| JSONC | Fail ❌ |
|
| JSONC | Fail ❌ |
|
||||||
| JSX | Fail ❌ |
|
| JSX | Fail ❌ |
|
||||||
|
| JSX_PRETTIER | Fail ❌ |
|
||||||
| KUBERNETES_KUBECONFORM | Fail ❌ |
|
| KUBERNETES_KUBECONFORM | Fail ❌ |
|
||||||
| KOTLIN | Fail ❌ |
|
| KOTLIN | Fail ❌ |
|
||||||
| LATEX | Fail ❌ |
|
| LATEX | Fail ❌ |
|
||||||
| LUA | Fail ❌ |
|
| LUA | Fail ❌ |
|
||||||
| MARKDOWN | Fail ❌ |
|
| MARKDOWN | Fail ❌ |
|
||||||
|
| MARKDOWN_PRETTIER | Fail ❌ |
|
||||||
| NATURAL_LANGUAGE | Fail ❌ |
|
| NATURAL_LANGUAGE | Fail ❌ |
|
||||||
| OPENAPI | Fail ❌ |
|
| OPENAPI | Fail ❌ |
|
||||||
| PERL | Fail ❌ |
|
| PERL | Fail ❌ |
|
||||||
|
@ -79,8 +85,10 @@
|
||||||
| TYPESCRIPT_ES | Fail ❌ |
|
| TYPESCRIPT_ES | Fail ❌ |
|
||||||
| TYPESCRIPT_PRETTIER | Fail ❌ |
|
| TYPESCRIPT_PRETTIER | Fail ❌ |
|
||||||
| TYPESCRIPT_STANDARD | Fail ❌ |
|
| TYPESCRIPT_STANDARD | Fail ❌ |
|
||||||
|
| VUE_PRETTIER | Fail ❌ |
|
||||||
| XML | Fail ❌ |
|
| XML | Fail ❌ |
|
||||||
| YAML | Fail ❌ |
|
| YAML | Fail ❌ |
|
||||||
|
| YAML_PRETTIER | Fail ❌ |
|
||||||
<!-- textlint-enable terminology -->
|
<!-- textlint-enable terminology -->
|
||||||
|
|
||||||
Super-linter detected linting errors
|
Super-linter detected linting errors
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
| COFFEESCRIPT | Pass ✅ |
|
| COFFEESCRIPT | Pass ✅ |
|
||||||
| CPP | Pass ✅ |
|
| CPP | Pass ✅ |
|
||||||
| CSS | Pass ✅ |
|
| CSS | Pass ✅ |
|
||||||
|
| CSS_PRETTIER | Pass ✅ |
|
||||||
| DART | Pass ✅ |
|
| DART | Pass ✅ |
|
||||||
| DOCKERFILE_HADOLINT | Pass ✅ |
|
| DOCKERFILE_HADOLINT | Pass ✅ |
|
||||||
| EDITORCONFIG | Pass ✅ |
|
| EDITORCONFIG | Pass ✅ |
|
||||||
|
@ -24,21 +25,26 @@
|
||||||
| GO_MODULES | Pass ✅ |
|
| GO_MODULES | Pass ✅ |
|
||||||
| GO_RELEASER | Pass ✅ |
|
| GO_RELEASER | Pass ✅ |
|
||||||
| GOOGLE_JAVA_FORMAT | Pass ✅ |
|
| GOOGLE_JAVA_FORMAT | Pass ✅ |
|
||||||
|
| GRAPHQL_PRETTIER | Pass ✅ |
|
||||||
| GROOVY | Pass ✅ |
|
| GROOVY | Pass ✅ |
|
||||||
| HTML | Pass ✅ |
|
| HTML | Pass ✅ |
|
||||||
|
| HTML_PRETTIER | Pass ✅ |
|
||||||
| JAVA | Pass ✅ |
|
| JAVA | Pass ✅ |
|
||||||
| JAVASCRIPT_ES | Pass ✅ |
|
| JAVASCRIPT_ES | Pass ✅ |
|
||||||
| JAVASCRIPT_PRETTIER | Pass ✅ |
|
| JAVASCRIPT_PRETTIER | Pass ✅ |
|
||||||
| JAVASCRIPT_STANDARD | Pass ✅ |
|
| JAVASCRIPT_STANDARD | Pass ✅ |
|
||||||
| JSCPD | Pass ✅ |
|
| JSCPD | Pass ✅ |
|
||||||
| JSON | Pass ✅ |
|
| JSON | Pass ✅ |
|
||||||
|
| JSON_PRETTIER | Pass ✅ |
|
||||||
| JSONC | Pass ✅ |
|
| JSONC | Pass ✅ |
|
||||||
| JSX | Pass ✅ |
|
| JSX | Pass ✅ |
|
||||||
|
| JSX_PRETTIER | Pass ✅ |
|
||||||
| KUBERNETES_KUBECONFORM | Pass ✅ |
|
| KUBERNETES_KUBECONFORM | Pass ✅ |
|
||||||
| KOTLIN | Pass ✅ |
|
| KOTLIN | Pass ✅ |
|
||||||
| LATEX | Pass ✅ |
|
| LATEX | Pass ✅ |
|
||||||
| LUA | Pass ✅ |
|
| LUA | Pass ✅ |
|
||||||
| MARKDOWN | Pass ✅ |
|
| MARKDOWN | Pass ✅ |
|
||||||
|
| MARKDOWN_PRETTIER | Pass ✅ |
|
||||||
| NATURAL_LANGUAGE | Pass ✅ |
|
| NATURAL_LANGUAGE | Pass ✅ |
|
||||||
| OPENAPI | Pass ✅ |
|
| OPENAPI | Pass ✅ |
|
||||||
| PERL | Pass ✅ |
|
| PERL | Pass ✅ |
|
||||||
|
@ -72,8 +78,10 @@
|
||||||
| TYPESCRIPT_ES | Pass ✅ |
|
| TYPESCRIPT_ES | Pass ✅ |
|
||||||
| TYPESCRIPT_PRETTIER | Pass ✅ |
|
| TYPESCRIPT_PRETTIER | Pass ✅ |
|
||||||
| TYPESCRIPT_STANDARD | Pass ✅ |
|
| TYPESCRIPT_STANDARD | Pass ✅ |
|
||||||
|
| VUE_PRETTIER | Pass ✅ |
|
||||||
| XML | Pass ✅ |
|
| XML | Pass ✅ |
|
||||||
| YAML | Pass ✅ |
|
| YAML | Pass ✅ |
|
||||||
|
| YAML_PRETTIER | Pass ✅ |
|
||||||
<!-- textlint-enable terminology -->
|
<!-- textlint-enable terminology -->
|
||||||
|
|
||||||
All files and directories linted successfully
|
All files and directories linted successfully
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
| CPP | Pass ✅ |
|
| CPP | Pass ✅ |
|
||||||
| CSHARP | Pass ✅ |
|
| CSHARP | Pass ✅ |
|
||||||
| CSS | Pass ✅ |
|
| CSS | Pass ✅ |
|
||||||
|
| CSS_PRETTIER | Pass ✅ |
|
||||||
| DART | Pass ✅ |
|
| DART | Pass ✅ |
|
||||||
| DOCKERFILE_HADOLINT | Pass ✅ |
|
| DOCKERFILE_HADOLINT | Pass ✅ |
|
||||||
| EDITORCONFIG | Pass ✅ |
|
| EDITORCONFIG | Pass ✅ |
|
||||||
|
@ -26,21 +27,26 @@
|
||||||
| GO_MODULES | Pass ✅ |
|
| GO_MODULES | Pass ✅ |
|
||||||
| GO_RELEASER | Pass ✅ |
|
| GO_RELEASER | Pass ✅ |
|
||||||
| GOOGLE_JAVA_FORMAT | Pass ✅ |
|
| GOOGLE_JAVA_FORMAT | Pass ✅ |
|
||||||
|
| GRAPHQL_PRETTIER | Pass ✅ |
|
||||||
| GROOVY | Pass ✅ |
|
| GROOVY | Pass ✅ |
|
||||||
| HTML | Pass ✅ |
|
| HTML | Pass ✅ |
|
||||||
|
| HTML_PRETTIER | Pass ✅ |
|
||||||
| JAVA | Pass ✅ |
|
| JAVA | Pass ✅ |
|
||||||
| JAVASCRIPT_ES | Pass ✅ |
|
| JAVASCRIPT_ES | Pass ✅ |
|
||||||
| JAVASCRIPT_PRETTIER | Pass ✅ |
|
| JAVASCRIPT_PRETTIER | Pass ✅ |
|
||||||
| JAVASCRIPT_STANDARD | Pass ✅ |
|
| JAVASCRIPT_STANDARD | Pass ✅ |
|
||||||
| JSCPD | Pass ✅ |
|
| JSCPD | Pass ✅ |
|
||||||
| JSON | Pass ✅ |
|
| JSON | Pass ✅ |
|
||||||
|
| JSON_PRETTIER | Pass ✅ |
|
||||||
| JSONC | Pass ✅ |
|
| JSONC | Pass ✅ |
|
||||||
| JSX | Pass ✅ |
|
| JSX | Pass ✅ |
|
||||||
|
| JSX_PRETTIER | Pass ✅ |
|
||||||
| KUBERNETES_KUBECONFORM | Pass ✅ |
|
| KUBERNETES_KUBECONFORM | Pass ✅ |
|
||||||
| KOTLIN | Pass ✅ |
|
| KOTLIN | Pass ✅ |
|
||||||
| LATEX | Pass ✅ |
|
| LATEX | Pass ✅ |
|
||||||
| LUA | Pass ✅ |
|
| LUA | Pass ✅ |
|
||||||
| MARKDOWN | Pass ✅ |
|
| MARKDOWN | Pass ✅ |
|
||||||
|
| MARKDOWN_PRETTIER | Pass ✅ |
|
||||||
| NATURAL_LANGUAGE | Pass ✅ |
|
| NATURAL_LANGUAGE | Pass ✅ |
|
||||||
| OPENAPI | Pass ✅ |
|
| OPENAPI | Pass ✅ |
|
||||||
| PERL | Pass ✅ |
|
| PERL | Pass ✅ |
|
||||||
|
@ -79,8 +85,10 @@
|
||||||
| TYPESCRIPT_ES | Pass ✅ |
|
| TYPESCRIPT_ES | Pass ✅ |
|
||||||
| TYPESCRIPT_PRETTIER | Pass ✅ |
|
| TYPESCRIPT_PRETTIER | Pass ✅ |
|
||||||
| TYPESCRIPT_STANDARD | Pass ✅ |
|
| TYPESCRIPT_STANDARD | Pass ✅ |
|
||||||
|
| VUE_PRETTIER | Pass ✅ |
|
||||||
| XML | Pass ✅ |
|
| XML | Pass ✅ |
|
||||||
| YAML | Pass ✅ |
|
| YAML | Pass ✅ |
|
||||||
|
| YAML_PRETTIER | Pass ✅ |
|
||||||
<!-- textlint-enable terminology -->
|
<!-- textlint-enable terminology -->
|
||||||
|
|
||||||
All files and directories linted successfully
|
All files and directories linted successfully
|
||||||
|
|
|
@ -4,12 +4,8 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# Default log level
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
LOG_LEVEL="DEBUG"
|
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "lib/functions/log.sh"
|
source "test/testUtils.sh"
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "lib/globals/languages.sh"
|
source "lib/globals/languages.sh"
|
||||||
|
@ -28,4 +24,27 @@ function LanguageArrayNotEmptyTest() {
|
||||||
notice "${FUNCTION_NAME} PASS"
|
notice "${FUNCTION_NAME} PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function LanguageTestPresenceTest() {
|
||||||
|
local FUNCTION_NAME
|
||||||
|
FUNCTION_NAME="${FUNCNAME[0]}"
|
||||||
|
info "${FUNCTION_NAME} start"
|
||||||
|
|
||||||
|
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
|
||||||
|
local -l LOWERCASE_LANGUAGE="${LANGUAGE}"
|
||||||
|
# shellcheck disable=SC2153
|
||||||
|
local LINTER_TEST_CASE_DIRECTORY="${LINTERS_TEST_CASE_DIRECTORY}/${LOWERCASE_LANGUAGE}"
|
||||||
|
|
||||||
|
if [[ ! -d "${LINTER_TEST_CASE_DIRECTORY}" ]]; then
|
||||||
|
fatal "Test case directory for ${LANGUAGE} (${LINTER_TEST_CASE_DIRECTORY}) doesn't exist or is not readable."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "${LINTER_TEST_CASE_DIRECTORY}")" ]; then
|
||||||
|
fatal "Test case directory for ${LANGUAGE} (${LINTER_TEST_CASE_DIRECTORY}) is empty, and it should contain test cases for ${LANGUAGE}."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
notice "${FUNCTION_NAME} PASS"
|
||||||
|
}
|
||||||
|
|
||||||
LanguageArrayNotEmptyTest
|
LanguageArrayNotEmptyTest
|
||||||
|
LanguageTestPresenceTest
|
||||||
|
|
22
test/linters/css_prettier/css_prettier_bad_01.css
Normal file
22
test/linters/css_prettier/css_prettier_bad_01.css
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* Multi-line comment
|
||||||
|
*/
|
||||||
|
|
||||||
|
.selector-1,
|
||||||
|
.selector-2,
|
||||||
|
.selector-3[type="text"] {
|
||||||
|
background: linear-gradient(#fff, rgb(0 0 0 / 80%));
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-a,
|
||||||
|
.selector-b:not(:first-child) {
|
||||||
|
padding: 10px !important;
|
||||||
|
top: calc(calc(1em * 2) / 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-x { width: 10%; }
|
||||||
|
.selector-y { width: 20%; }
|
||||||
|
.selector-z { width: 30%; }
|
30
test/linters/css_prettier/css_prettier_good_01.css
Normal file
30
test/linters/css_prettier/css_prettier_good_01.css
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/**
|
||||||
|
* Multi-line comment
|
||||||
|
*/
|
||||||
|
|
||||||
|
.selector-1,
|
||||||
|
.selector-2,
|
||||||
|
.selector-3[type="text"] {
|
||||||
|
background: linear-gradient(#fff, rgb(0 0 0 / 80%));
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-a,
|
||||||
|
.selector-b:not(:first-child) {
|
||||||
|
padding: 10px !important;
|
||||||
|
top: calc(calc(1em * 2) / 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-x {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-y {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selector-z {
|
||||||
|
width: 30%;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
type Project {name: String
|
||||||
|
tagline: String
|
||||||
|
contributors: [User]}
|
|
@ -0,0 +1,5 @@
|
||||||
|
type Project {
|
||||||
|
name: String
|
||||||
|
tagline: String
|
||||||
|
contributors: [User]
|
||||||
|
}
|
13
test/linters/html_prettier/html_prettier_bad_01.html
Normal file
13
test/linters/html_prettier/html_prettier_bad_01.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
Good HTML!
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
11
test/linters/html_prettier/html_prettier_good_01.html
Normal file
11
test/linters/html_prettier/html_prettier_good_01.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
Good HTML!
|
||||||
|
</body>
|
||||||
|
</html>
|
13
test/linters/json_prettier/json_prettier_bad_01.json
Normal file
13
test/linters/json_prettier/json_prettier_bad_01.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"arrow_spacing": {
|
||||||
|
"level": [
|
||||||
|
"ignore"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"foo": "bar",
|
||||||
|
"braces_spacing": {
|
||||||
|
"level": "ignore",
|
||||||
|
"spaces": 0,
|
||||||
|
"empty_object_spaces": 0
|
||||||
|
}
|
||||||
|
}
|
10
test/linters/json_prettier/json_prettier_good_01.json
Normal file
10
test/linters/json_prettier/json_prettier_good_01.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"arrow_spacing": {
|
||||||
|
"level": "ignore"
|
||||||
|
},
|
||||||
|
"braces_spacing": {
|
||||||
|
"level": "ignore",
|
||||||
|
"spaces": 0,
|
||||||
|
"empty_object_spaces": 0
|
||||||
|
}
|
||||||
|
}
|
4
test/linters/jsx_prettier/jsx_prettier_bad_01.jsx
Normal file
4
test/linters/jsx_prettier/jsx_prettier_bad_01.jsx
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const element = <h1>Hello, world!</h1>;
|
||||||
|
console.log(element)
|
4
test/linters/jsx_prettier/jsx_prettier_good_01.jsx
Normal file
4
test/linters/jsx_prettier/jsx_prettier_good_01.jsx
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const element = <h1>Hello, world!</h1>;
|
||||||
|
console.log(element);
|
20
test/linters/markdown_prettier/markdown_prettier_bad_01.md
Normal file
20
test/linters/markdown_prettier/markdown_prettier_bad_01.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Good Markdown
|
||||||
|
|
||||||
|
This is just standard good markdown.
|
||||||
|
|
||||||
|
## Second level header
|
||||||
|
|
||||||
|
This header follows the step down from `level 1`.
|
||||||
|
|
||||||
|
- Here it *is*
|
||||||
|
- Some more **indention**
|
||||||
|
- why so much?
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls -la
|
||||||
|
```
|
||||||
|
|
||||||
|
### Walk away
|
||||||
|
|
||||||
|
We're all done **here**.
|
||||||
|
- [Link Action](https://github.com)
|
21
test/linters/markdown_prettier/markdown_prettier_good_01.md
Normal file
21
test/linters/markdown_prettier/markdown_prettier_good_01.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Good Markdown
|
||||||
|
|
||||||
|
This is just standard good markdown.
|
||||||
|
|
||||||
|
## Second level header
|
||||||
|
|
||||||
|
This header follows the step down from `level 1`.
|
||||||
|
|
||||||
|
- Here it _is_
|
||||||
|
- Some more **indention**
|
||||||
|
- why so much?
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls -la
|
||||||
|
```
|
||||||
|
|
||||||
|
### Walk away
|
||||||
|
|
||||||
|
We're all done **here**.
|
||||||
|
|
||||||
|
- [Link Action](https://github.com)
|
23
test/linters/vue_prettier/vue_prettier_bad_01.vue
Normal file
23
test/linters/vue_prettier/vue_prettier_bad_01.vue
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<template>
|
||||||
|
<div class="example">{{ msg }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msg: 'Hello world!'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.example {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<custom1>
|
||||||
|
This could be e.g. documentation for the component.
|
||||||
|
</custom1>
|
23
test/linters/vue_prettier/vue_prettier_good_01.vue
Normal file
23
test/linters/vue_prettier/vue_prettier_good_01.vue
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<template>
|
||||||
|
<div class="example">{{ msg }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msg: "Hello world!",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.example {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<custom1>
|
||||||
|
This could be e.g. documentation for the component.
|
||||||
|
</custom1>
|
19
test/linters/yaml_prettier/yaml_prettier_bad_01.yml
Normal file
19
test/linters/yaml_prettier/yaml_prettier_bad_01.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
## Heres some vars ##
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
|
||||||
|
############
|
||||||
|
# Env Vars #
|
||||||
|
############
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: true
|
||||||
|
jest: true
|
||||||
|
|
||||||
|
Here: there
|
||||||
|
|
||||||
|
something: "For Nothing"
|
19
test/linters/yaml_prettier/yaml_prettier_bad_02.yaml
Normal file
19
test/linters/yaml_prettier/yaml_prettier_bad_02.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
## Heres some vars ##
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
|
||||||
|
############
|
||||||
|
# Env Vars #
|
||||||
|
############
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: true
|
||||||
|
jest: true
|
||||||
|
|
||||||
|
Here: there
|
||||||
|
|
||||||
|
something: "For Nothing"
|
18
test/linters/yaml_prettier/yaml_prettier_good_01.yml
Normal file
18
test/linters/yaml_prettier/yaml_prettier_good_01.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
## Heres some vars ##
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
|
||||||
|
############
|
||||||
|
# Env Vars #
|
||||||
|
############
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: true
|
||||||
|
jest: true
|
||||||
|
|
||||||
|
Here: there
|
||||||
|
|
||||||
|
something: "For Nothing"
|
18
test/linters/yaml_prettier/yaml_prettier_good_02.yaml
Normal file
18
test/linters/yaml_prettier/yaml_prettier_good_02.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
## Heres some vars ##
|
||||||
|
#####################
|
||||||
|
#####################
|
||||||
|
|
||||||
|
############
|
||||||
|
# Env Vars #
|
||||||
|
############
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: true
|
||||||
|
jest: true
|
||||||
|
|
||||||
|
Here: there
|
||||||
|
|
||||||
|
something: "For Nothing"
|
|
@ -22,18 +22,24 @@ LANGUAGES_WITH_FIX_MODE=(
|
||||||
"CLANG_FORMAT"
|
"CLANG_FORMAT"
|
||||||
"CSHARP"
|
"CSHARP"
|
||||||
"CSS"
|
"CSS"
|
||||||
|
"CSS_PRETTIER"
|
||||||
"ENV"
|
"ENV"
|
||||||
"GO_MODULES"
|
"GO_MODULES"
|
||||||
"GO"
|
"GO"
|
||||||
"GOOGLE_JAVA_FORMAT"
|
"GOOGLE_JAVA_FORMAT"
|
||||||
"GROOVY"
|
"GROOVY"
|
||||||
|
"GRAPHQL_PRETTIER"
|
||||||
|
"HTML_PRETTIER"
|
||||||
"JAVASCRIPT_ES"
|
"JAVASCRIPT_ES"
|
||||||
"JAVASCRIPT_PRETTIER"
|
"JAVASCRIPT_PRETTIER"
|
||||||
"JAVASCRIPT_STANDARD"
|
"JAVASCRIPT_STANDARD"
|
||||||
"JSON"
|
"JSON"
|
||||||
|
"JSON_PRETTIER"
|
||||||
"JSONC"
|
"JSONC"
|
||||||
"JSX"
|
"JSX"
|
||||||
|
"JSX_PRETTIER"
|
||||||
"MARKDOWN"
|
"MARKDOWN"
|
||||||
|
"MARKDOWN_PRETTIER"
|
||||||
"NATURAL_LANGUAGE"
|
"NATURAL_LANGUAGE"
|
||||||
"POWERSHELL"
|
"POWERSHELL"
|
||||||
"PROTOBUF"
|
"PROTOBUF"
|
||||||
|
@ -54,6 +60,8 @@ LANGUAGES_WITH_FIX_MODE=(
|
||||||
"TYPESCRIPT_ES"
|
"TYPESCRIPT_ES"
|
||||||
"TYPESCRIPT_PRETTIER"
|
"TYPESCRIPT_PRETTIER"
|
||||||
"TYPESCRIPT_STANDARD"
|
"TYPESCRIPT_STANDARD"
|
||||||
|
"VUE_PRETTIER"
|
||||||
|
"YAML_PRETTIER"
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: extract this list from linter.sh (see REMOVE_ARRAY) instead of
|
# TODO: extract this list from linter.sh (see REMOVE_ARRAY) instead of
|
||||||
|
|
Loading…
Reference in a new issue