mirror of
https://github.com/uklans/cache-domains
synced 2025-08-02 14:21:22 +02:00
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
40 lines
772 B
YAML
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
|