cache-domains/.mega-linter.yml
Amir Zarrinkafsh 098c1e9c54
feat: add lefthook, megalinter and update editorconfig (#270)
This change adds [LeftHook](https://lefthook.dev/) as a GitHub hook management tool alongside [MegaLinter](https://megalinter.io/) to lint all relevant files within the repository.

For users that don't end up installing LeftHook for pre-commit hooks, megalinter picks up the necessary formatting changes and reports them.

* feat: add lefthook, megalinter and update editorconfig
* fix: lint commit ordering
* refactor: adjust megalinter reporters
* refactor: adjust description for cache domains
* refactor: single - for passing options
* refactor: add repo-specific fmt in megalinter pre-commands too
2025-07-24 10:59:52 +10:00

40 lines
772 B
YAML

# Configuration file for MegaLinter
#
# See all available variables at https://megalinter.io/latest/config-file/ and in
# linters documentation
APPLY_FIXES: all
FLAVOR_SUGGESTIONS: false
PRINT_ALPACA: false
SHOW_ELAPSED_TIME: true
ENABLE:
- ACTION
- BASH
- EDITORCONFIG
- JSON
- MARKDOWN
- SPELL
- YAML
DISABLE_LINTERS:
- JSON_V8R
- MARKDOWN_MARKDOWNLINT
- SPELL_CSPELL
- YAML_V8R
PRE_COMMANDS:
- command: apk add --no-cache yq
cwd: root
- command: yq -i ".cache_domains |= sort_by(.name)" cache_domains.json
cwd: workspace
- command: |
for f in *.txt; do
sort -uo ${f} ${f}
done
cwd: workspace
POST_COMMANDS:
- command: find . -user root -group root -exec chown ${USER}:${GROUP} {} \;
cwd: workspace