mirror of
https://github.com/scifijunk/cache-domains.git
synced 2026-02-04 00:21:01 -06:00
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
This commit is contained in:
39
.mega-linter.yml
Normal file
39
.mega-linter.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user