From 0cd334ff034857c529bef5ef49c72a71e9c81eec Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 18 Mar 2024 18:19:15 +0100 Subject: [PATCH] chore(repo/management): markdownlint --- .lefthook.yml | 10 ++++++++++ .markdownlint.json | 4 ---- .markdownlint.yaml | 7 +++++++ .vscode/settings.json | 33 ++++++++++++++++++++++++++++++--- README.md | 4 +++- 5 files changed, 50 insertions(+), 8 deletions(-) delete mode 100644 .markdownlint.json create mode 100644 .markdownlint.yaml diff --git a/.lefthook.yml b/.lefthook.yml index 10e2195..db85112 100644 --- a/.lefthook.yml +++ b/.lefthook.yml @@ -15,6 +15,11 @@ lint: # just use the local command. glob: "*Dockerfile*" run: hadolint {all_files} + md: &markdownlint + glob: "*.md" + run: >- # '{all_files}' and {files} only include ones managed by git for some reason + docker run --rm -v "$PWD:/workdir" 'ghcr.io/igorshubovych/markdownlint-cli:latest' + **.md yaml: &yamllint glob: "*.{yaml,yml}" run: >- @@ -53,6 +58,11 @@ pre-commit: lint-docker: <<: *hadolint run: hadolint {staged_files} + lint-md: + <<: *markdownlint + run: >- + docker run --rm -v "$PWD:/workdir" 'ghcr.io/igorshubovych/markdownlint-cli:latest' + {staged_files} lint-yaml: <<: *yamllint run: >- diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index e120670..0000000 --- a/.markdownlint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "MD013": false, - "MD033": false -} diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..b4d1dde --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,7 @@ +--- +# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml + +default: true +MD013: + line_length: 120 +MD033: false diff --git a/.vscode/settings.json b/.vscode/settings.json index 9b33feb..a91c7f5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,12 +1,39 @@ { "editor.formatOnPaste": true, "json.schemas": [ + { + "fileMatch": [ + ".lefthook.yaml", + ".lefthook.yml" + ], + "url": "https: //json.schemastore.org/lefthook.json" + }, + { + "fileMatch": [ + ".markdownlint.js", + ".markdownlint.json", + ".markdownlint.jsonc", + ".markdownlint.yaml" + ], + "url": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json" + }, { "fileMatch": [ ".pre-commit-config.yaml" ], "url": "https://json.schemastore.org/pre-commit-config.json" + }, + { + "fileMatch": [ "package.json" ], + "url": "https://json.schemastore.org/package.json" + }, + { + "fileMatch": [ "Pulumi.yaml" ], + "url": "https://json.schemastore.org/pulumi.json" } ], + "markdown.extension.toc.levels": "2..6", + "markdown.extension.toc.orderedList": true, + "cSpell.language": "en,en-GB", "cSpell.words": [ "adduser", @@ -57,6 +84,7 @@ "eeprom", "epel", "fallocate", + "fargate", "fastboot", "fdupes", "firewalld", @@ -90,6 +118,7 @@ "keygrip", "kivi", "knockd", + "kubeconfig", "kubectx", "kubelet", "kubens", @@ -177,7 +206,5 @@ "xattr", "xkcd", "zstd" - ], - "markdown.extension.toc.levels": "2..6", - "markdown.extension.toc.orderedList": true + ] } \ No newline at end of file diff --git a/README.md b/README.md index 0b9ae47..13b5cef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # OAM -A.K.A. _Operations, administration and management_ or _operations, administration and maintenance_, the processes, activities, tools, and standards involved with operating, administering, managing and maintaining any system. This commonly applies to telecommunication, computer networks, and computer hardware. +A.K.A. _Operations, administration and management_ or _operations, administration and maintenance_, the processes, +activities, tools, and standards involved with operating, administering, managing and maintaining any system.
. +This commonly applies to telecommunication, computer networks, and computer hardware. In short, my private collection of notes and scripts. I use them to ease my tech life.