From cfe6c5a687eeb4611b476d307d1d405b3883d502 Mon Sep 17 00:00:00 2001 From: Sven Greb Date: Tue, 27 Apr 2021 18:58:11 +0200 Subject: [PATCH] Migrate to Markdown style guide version `0.4.0` This project adheres to the "Arctic Ice Studio Markdown style guide" [1] which recently published version `0.4.0` [2] that introduces some larger changes: - The repository was converted into a monorepo [3] and the currently used `remark-preset-lint-arcticicestudio` [4] npm package was deprecated and moved into the new, scoped `@arcticicestudio/remark-preset-lint` [5] package. - Support for the shiny new remark version `13.0.0` [7] was introduced which is now the minimum required version for the rule preset packages. - Several other great improvements and migrations like the adaption of this template repository [8] as well as the usage of the GitHub Flow [9] branching model and new `main` branch concept [10]. [1]: https://github.com/arcticicestudio/styleguide-markdown [2]: https://github.com/arcticicestudio/styleguide-markdown/releases/tag/v0.4.0 [3]: https://github.com/arcticicestudio/styleguide-markdown/issues/10 [4]: https://www.npmjs.com/package/remark-preset-lint-arcticicestudio [5]: https://www.npmjs.com/package/@arcticicestudio/remark-preset-lint [6]: https://github.com/arcticicestudio/styleguide-markdown/issues/28 [7]: https://github.com/arcticicestudio/styleguide-markdown/issues/28 [8]: https://github.com/arcticicestudio/styleguide-markdown/issues/11 [9]: https://github.com/arcticicestudio/styleguide-markdown/issues/19 [10]: https://github.com/arcticicestudio/styleguide-markdown/issues/21 GH-76 --- .editorconfig | 5 +++++ .gitattributes | 7 ++++--- .github/CODEOWNERS | 5 +++-- .github/ISSUE_TEMPLATE.md | 2 +- .github/ISSUE_TEMPLATE/enhancement.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- .github/workflows/ci.yml | 4 ++-- .gitignore | 2 +- .husky/pre-commit | 3 ++- .mailmap | 2 +- .npmrc | 21 +++++++++++++++++++-- .prettierignore | 2 +- .remarkignore | 2 +- .remarkrc.js | 4 ++-- CHANGELOG.md | 23 +++++++++-------------- CONTRIBUTING.md | 15 ++------------- README.md | 5 +++-- lint-staged.config.js | 6 +++--- package.json | 12 ++++++------ prettier.config.js | 2 +- 20 files changed, 69 insertions(+), 59 deletions(-) diff --git a/.editorconfig b/.editorconfig index 48c23be..9f78d2a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,14 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. +# Configurations for EditorConfig. +# See https://editorconfig.org/#file-format-details for more details. + # +--------------------+ # + Base Configuration + # +--------------------+ +root = true + [*] charset = utf-8 end_of_line = lf diff --git a/.gitattributes b/.gitattributes index 86bea14..19a29d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,9 +2,10 @@ # This source code is licensed under the MIT license found in the LICENSE file. # Configuration to define attributes per path. -# See the following references for more details: -# - https://git-scm.com/docs/gitattributes -# - https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Keyword-Expansion +# +# References: +# 1. https://git-scm.com/docs/gitattributes +# 2. https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Keyword-Expansion # Automatically perform line feed (LF) normalization for files detected as text and # leave all files detected as binary untouched. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a42f174..999cb3d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,8 +3,9 @@ # Configuration for the GitHub feature to automatically request reviews from the code owners # when a pull request changes any owned files. -# See: -# 1. https://help.github.com/articles/about-codeowners +# +# References: +# 1. https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners # 2. https://github.com/blog/2392-introducing-code-owners # +----------------------+ diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 5eb3c8b..6a1f37b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,6 +8,6 @@ To keep the backlog clean and actionable, issues should be opened using [one the ### Support -If you got a question or need help with any aspect of the project feel free to ask and ensure to read the [extensive project documentations](https://nordtheme.com/docs). +If you got a question or need help with any aspect of the project feel free to ask and ensure to read the [extensive project documentations](https://github.com/svengreb/tmpl/blob/main/README.md). You can also search for already opened and related issue using the search for the [“question“](https://github.com/svengreb/tmpl/labels/type-question) issue label. diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index 0741e1b..a6f413b 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -14,7 +14,7 @@ This section and the instructions in the sections below are only part of this is Please do your best to provide as much information as possible and use a clear and descriptive title for your enhancement suggestion to help maintainers and the community understand and reproduce the behavior, find related reports and to resolve the ticket faster. - **Ensure the enhancement has not already been reported by using the [GitHub Issues search](https://github.com/svengreb/tmpl/issues)** — check if this enhancement has already been suggested. If it has **and the issue is still open**, add your additions as comment to the existing issue instead of opening a new one. If you find a closed issue that seems to be similar to this one, include a link to the original issue in the [metadata head](#metadata-head) section of this issue. -- **Ensure your contribution belongs to the correct [baee or specialized template repository](https://github.com/svengreb?&tab=repositories&q=tmpl).** +- **Ensure your contribution belongs to the correct [base or specialized template repository](https://github.com/svengreb?&tab=repositories&q=tmpl).** - **Check if the enhancement has already been implemented** — use the [latest version](https://github.com/svengreb/tmpl/releases/latest) and [`main`](https://github.com/svengreb/tmpl/tree/main) branch to ensure that the feature or improvement has not already been added. ## Metadata Head diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e329761..a9c6e0e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ -> **Please read the [contribution guidelines](https://github.com/svengreb/tmpl/blob/main/CONTRIBUTING.md) before filling out this issue template**. +> **Please read the [contribution guidelines](https://github.com/svengreb/tmpl/blob/main/CONTRIBUTING.md) before filling out this pull request template**. ## Prerequisites @@ -8,7 +8,7 @@ This section and the instructions in the sections below are only part of this pu Please do your best to provide as much information as possible and use a clear and descriptive title for your enhancement suggestion or bug fix to help maintainers and the community understand and reproduce the behavior, find related pull requests and to merge it faster. -- **Ensure the pull request has not already been submitted by using the [GitHub Issue search](https://github.com/svengreb/tmpl/issues)** — check if this enhancement or bug fix has already been suggested. If it has **and the pull request is still open**, add your additions as comment or [suggest a change](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#applying-a-suggested-change) to the existing pull request instead of opening a new one. If you find a closed pull request that seems to be similar to this one, include a link to the original pull request in the [metadata head](#metadata-head) section of this new pull request. +- **Ensure the pull request has not already been submitted by using the [GitHub Pull Request search](https://github.com/svengreb/tmpl/pulls)** — check if this enhancement or bug fix has already been suggested. If it has **and the pull request is still open**, add your additions as comment or [suggest a change](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#applying-a-suggested-change) to the existing pull request instead of opening a new one. If you find a closed pull request that seems to be similar to this one, include a link to the original pull request in the [metadata head](#metadata-head) section of this new pull request. - **Ensure your contribution belongs to the correct [base or specialized template repository](https://github.com/svengreb?&tab=repositories&q=tmpl).** - **Ensure to adhere to the [pull request contribution guidelines](https://github.com/svengreb/tmpl/blob/main/CONTRIBUTING.md#pull-requests)**, especially the one for tests and documentations. - **Check if the enhancement has already been implemented or bug already fixed** — use the [latest version](https://github.com/svengreb/tmpl/releases/latest) and [`main`](https://github.com/svengreb/tmpl/tree/main) branch to ensure that the enhancement or bug fix has not already been added. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 245c828..34f87cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,10 @@ jobs: echo "Workflow Actor: $GITHUB_ACTOR" - name: Checkout repository uses: actions/checkout@v2 - - name: "Setup Node.js version 14.x" + - name: "Setup Node.js version 15" uses: actions/setup-node@v2.1.5 with: - node-version: "15.13.x" + node-version: "15" - name: Install Node modules run: npm install - name: Run linters diff --git a/.gitignore b/.gitignore index 3ac975e..ecee8cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. -# Configuration to specify paths to ignore. +# Path match pattern to intentionally ignore untracked files and directories. # See https://git-scm.com/docs/gitignore for more details. # +--------------------+ diff --git a/.husky/pre-commit b/.husky/pre-commit index c6759b0..0b78650 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,10 +3,11 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. -# The configuration for husky. +# Git "pre-commit" hook for husky. # # References: # 1. https://github.com/typicode/husky +# 2. https://git-scm.com/docs/githooks#_pre_commit . "$(dirname "$0")/_/husky.sh" diff --git a/.mailmap b/.mailmap index f00fbb4..c07f588 100644 --- a/.mailmap +++ b/.mailmap @@ -1,7 +1,7 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. -# Configuration for Git mail mapping feature to coalesce together commits by the same person in the shortlog, +# Configuration for the Git mail mapping feature to coalesce together commits by the same person in the shortlog, # where their name and/or email address was spelled differently or has been changed. # See https://git-scm.com/docs/git-shortlog#_mapping_authors for more details. Sven Greb diff --git a/.npmrc b/.npmrc index 0ca8d2a..911ee2a 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,19 @@ -package-lock=false -save-exact=true +# Copyright (c) 2020-present Sven Greb +# This source code is licensed under the MIT license found in the LICENSE file. + +# Configurations for npm. +# See https://docs.npmjs.com/cli/v7/configuring-npm/npmrc for more details. + +# Only use a lockfile for single-consumer projects, like applications, but not for multi-consumer projects like +# libraries. +# It helps to pin dependency versions, improves the security through integrity checksums, prevents possible errors +# caused by updated transitive dependencies and allows to get deterministic build results, but it can hide problems in +# multi-consumer projects when any later versions of a used dependency, or its transitive dependencies, is not +# compatible with the own project anymore. +# See https://github.com/svengreb/tmpl/issues/70 for more details. +package-lock=true + +# Resolve to the latest minor and patch updates. +# Enable to automatically pin dependencies to exact versions instead of resolving to latest minor and patch updates. +# This prevents possible errors caused by updated transitive dependencies. +save-exact=false diff --git a/.prettierignore b/.prettierignore index 2a52bd0..6357263 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,7 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. -# Configuration to specify paths to ignore. +# Path match pattern to ignore (i.e. not reformat) certain files and folders. # See https://prettier.io/docs/en/ignore for more details. **/node_modules/* diff --git a/.remarkignore b/.remarkignore index d46d9dd..cdd6a32 100644 --- a/.remarkignore +++ b/.remarkignore @@ -1,7 +1,7 @@ # Copyright (c) 2020-present Sven Greb # This source code is licensed under the MIT license found in the LICENSE file. -# Configuration to specify paths to ignore. +# Path match pattern to ignore when searching for files. # See https://github.com/unifiedjs/unified-engine/blob/HEAD/doc/ignore.md for more details. # Important: Directories must have no "asterisk" wildcard character at the path end, diff --git a/.remarkrc.js b/.remarkrc.js index d9e696c..1a68197 100644 --- a/.remarkrc.js +++ b/.remarkrc.js @@ -4,10 +4,10 @@ */ /** - * The configuration for remark-lint. + * Configurations for remark-lint. * * @see https://github.com/remarkjs/remark-lint */ module.exports = { - plugins: ["remark-preset-lint-arcticicestudio"], + plugins: ["@arcticicestudio/remark-preset-lint"], }; diff --git a/CHANGELOG.md b/CHANGELOG.md index 04b32a2..3cbee20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,8 +32,8 @@ This change also comes with updates to all documentations, including the additio ↠ Bumped outdated Go module dependencies and GitHub actions to their latest versions: - #67, #68, #69 (⊶ 8bff7a5d, 46a92f0a, 14a9108e) [`actions/setup-node`][gh-actions/setup-node] from [v2.1.2 to v2.1.5][gh-actions/setup-node-comp-v2.1.2_v2.1.5] -- #74 ⇄ #75 (⊶ d827dbf5) [husky][gh-typicode/husky] — Bumped minimum version from [`v4.3.0` to `v6.0.0`][gh-typicode/husky-comp-v4.3.0_v6.0.0]. This also includes some breaking changes that require migrations. Run the official migration CLI to automatically migrate from v4 to v6: `npx husky-init && npm exec -- github:typicode/husky-4-to-6 --remove-v4-config` -- #74 ⇄ #75 (⊶ d827dbf5) [lint-staged][gh-okonet/lint-staged] — Bumped minimum version from [`v10.5.1` to `v10.5.4`][gh-okonet/lint-staged-comp-v10.5.1_v10.5.4]. +- #74 ⇄ #75 (⊶ d827dbf5) [husky][] — Bumped minimum version from [`v4.3.0` to `v6.0.0`][gh-typicode/husky-comp-v4.3.0_v6.0.0]. This also includes some breaking changes that require migrations. Run the official migration CLI to automatically migrate from v4 to v6: `npx husky-init && npm exec -- github:typicode/husky-4-to-6 --remove-v4-config` +- #74 ⇄ #75 (⊶ d827dbf5) [lint-staged][] — Bumped minimum version from [`v10.5.1` to `v10.5.4`][gh-okonet/lint-staged-comp-v10.5.1_v10.5.4]. - #74 ⇄ #75 (⊶ d827dbf5) [remark-cli][gh-remarkjs/remark] — Bumped minimum version from [`v8.0.1` to `v9.0.0`][gh-remarkjs/remark-comp-v8.0.1_v9.0.0]. @@ -140,8 +140,8 @@ Basically #22 was reverted, taking the changes from #23 into account, so that SV ↠ Bumped outdated Node.js package dependencies & GitHub Actions to their latest versions: - #54 (⊶ 41e11b94) [`actions/setup-node`][gh-actions/setup-node] from [v1 to v2.1.2][gh-actions/setup-node-comp-v1_v2.1.2] — v2 comes with speed and performance improvements by using a dedicated, built-in image cache for Node.js distributions. -- #55 (⊶ d1e3d538) [`lint-staged`][gh-lint-staged] from [10.2.11 to 10.5.12][gh-lint-staged-comp-v10.2.11_v10.5.1] -- #56 (⊶ 22652c51) [`husky`][gh-husky] from [4.2.5 to 4.3.0][gh-husky-comp-v4.2.5_v4.3.0] +- #55 (⊶ d1e3d538) [`lint-staged`][lint-staged] from [10.2.11 to 10.5.12][gh-lint-staged-comp-v10.2.11_v10.5.1] +- #56 (⊶ 22652c51) [`husky`][husky] from [4.2.5 to 4.3.0][gh-husky-comp-v4.2.5_v4.3.0] - #57 (⊶ 17378a12) [`prettier`][prettier] from [2.0.5 to 2.1.2][gh-prettier-comp-2.0.5_2.1.2] @@ -525,7 +525,7 @@ The `.huskyrc.js` configuration file is placed in the project root and includes

-↠ Using [GitHub Actions][gh-actions] brings many advantages like a „close-to-the-source“ development pipeline. Having the code and automated pipelines/workflows in one place is worth a lot. This also comes along with the perfect and smooth integrations into GitHub platform and page itself like status reports on PRs and many more possibilities like the [customization and triggering of workflows through webhooks][gh-docs-actions-events] for almost every event that can occur in a repository/issue/PR etc. +↠ Using [GitHub Actions][gh-docs-actions] brings many advantages like a „close-to-the-source“ development pipeline. Having the code and automated pipelines/workflows in one place is worth a lot. This also comes along with the perfect and smooth integrations into GitHub platform and page itself like status reports on PRs and many more possibilities like the [customization and triggering of workflows through webhooks][gh-docs-actions-events] for almost every event that can occur in a repository/issue/PR etc.

@@ -651,6 +651,9 @@ otherwise Markdown elements are not parsed and rendered! [gh-actions/setup-node]: https://github.com/actions/setup-node +[gh-docs-actions]: https://docs.github.com/en/actions +[husky]: https://github.com/typicode/husky +[lint-staged]: https://github.com/okonet/lint-staged [prettier]: https://prettier.io [shields.io]: https://shields.io [yarn-docs-lock]: https://yarnpkg.com/lang/en/docs/yarn-lock @@ -663,7 +666,6 @@ otherwise Markdown elements are not parsed and rendered! [gh-13]: https://github.com/svengreb/tmpl/issues/13 [gh-15]: https://github.com/svengreb/tmpl/issues/15 [gh-17]: https://github.com/svengreb/tmpl/issues/17 -[gh-actions]: https://docs.github.com/en/actions [gh-blog-codeowner_intro]: https://github.blog/2017-07-06-introducing-code-owners [gh-blog-community_tools]: https://github.blog/2017-06-14-new-community-tools [gh-blog-contrib_guidelines]: https://github.blog/2012-09-17-contributing-guidelines @@ -672,7 +674,6 @@ otherwise Markdown elements are not parsed and rendered! [gh-comm_profile]: https://github.com/svengreb/tmpl/community [gh-compare-tag-init_v0.1.0]: https://github.com/svengreb/tmpl/compare/0b0d7aee...v0.1.0 [gh-docs-actions-events]: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events -[gh-docs-actions]: https://docs.github.com/en/actions [gh-docs-coc]: https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project [gh-docs-contrib-guide]: https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors [gh-docs-issue_pr_tmpl]: https://docs.github.com/en/github/building-a-strong-community/about-issue-and-pull-request-templates @@ -693,9 +694,7 @@ otherwise Markdown elements are not parsed and rendered! [gofmt]: https://golang.org/cmd/gofmt [goldmark]: https://github.com/yuin/goldmard [husky-hooks]: https://github.com/typicode/husky/blob/master/DOCS.md#supported-hooks -[husky]: https://github.com/typicode/husky [lefthook]: https://github.com/Arkweid/lefthook -[lint-staged]: https://github.com/okonet/lint-staged [markdown]: https://en.wikipedia.org/wiki/Markdown [mit]: https://opensource.org/licenses/MIT [nodejs]: https://nodejs.org @@ -721,7 +720,7 @@ otherwise Markdown elements are not parsed and rendered! [gh-docs-actions-wf#on_pull]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths [gh-docs-actions-wf#on_push_pull]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags [goland]: https://www.jetbrains.com/go -[intellij]: https://www.jetbrains.com +[intellij]: https://www.jetbrains.com/idea [jetbrains-plugins]: https://plugins.jetbrains.com [jetbrains]: https://www.jetbrains.com @@ -756,9 +755,7 @@ otherwise Markdown elements are not parsed and rendered! [gh-actions/setup-node-comp-v1_v2.1.2]: https://github.com/actions/setup-node/compare/v1...v2.1.2 [gh-compare-tag-v0.6.0_v0.7.0]: https://github.com/svengreb/tmpl/compare/v0.6.0...v0.7.0 [gh-husky-comp-v4.2.5_v4.3.0]: https://github.com/typicode/husky/compare/v4.2.5...v4.3.0 -[gh-husky]: https://github.com/typicode/husky [gh-lint-staged-comp-v10.2.11_v10.5.1]: https://github.com/okonet/lint-staged/compare/v10.2.11...v10.5.1 -[gh-lint-staged]: https://github.com/okonet/lint-staged [gh-prettier-comp-2.0.5_2.1.2]: https://github.com/prettier/prettier/compare/2.0.5...2.1.2 @@ -782,12 +779,10 @@ otherwise Markdown elements are not parsed and rendered! [gh-compare-tag-v0.8.0_v0.9.0]: https://github.com/svengreb/tmpl/compare/v0.8.0...v0.9.0 [gh-npm/cli-rel-v7.7.0]: https://github.com/npm/cli/releases/tag/v7.7.0 [gh-okonet/lint-staged-comp-v10.5.1_v10.5.4]: https://github.com/typicode/husky/compare/v10.5.1...v10.5.4 -[gh-okonet/lint-staged]: https://github.com/okonet/lint-staged [gh-remarkjs/remark-comp-v8.0.1_v9.0.0]: https://github.com/typicode/husky/compare/v8.0.1...v9.0.0 [gh-remarkjs/remark]: https://github.com/remarkjs/remark/releases [gh-sindresorhus/ama-479#c-310661514]: https://github.com/sindresorhus/ama/issues/479#issuecomment-310661514 [gh-typicode/husky-comp-v4.3.0_v6.0.0]: https://github.com/typicode/husky/compare/v4.3.0...v6.0.0 -[gh-typicode/husky]: https://github.com/typicode/husky [gh-yarnpkg/berry]: https://github.com/yarnpkg/berry [node-dist-v15.13.0]: https://nodejs.org/dist/v15.13.0 [npm-blog-v7_keep_lock]: https://blog.npmjs.org/post/621733939456933888/npm-v7-series-why-keep-package-lockjson.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dddf06f..1886bf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,23 +125,15 @@ A style guide establishes and enforces style to improve the intelligibility and tmpl adheres to the [Arctic Ice Studio JavaScript Style Guide][gh-styleguide-javascript]. -[![][gh-styleguide-javascript-badge]][gh-styleguide-javascript] - ### Markdown Style Guide tmpl adheres to the [Arctic Ice Studio Markdown Style Guide][gh-styleguide-markdown]. -[![][gh-styleguide-markdown-badge]][gh-styleguide-markdown] - ### Git Commit Messages A well-crafted Git commit message is the best way to communicate _context_ about a change to the maintainers. The code will tell what changed, but only the commit message can properly tell why. Re-establishing the context of a piece of code is wasteful. We can't avoid it completely, so our efforts should go to reducing it as much as possible. -tmpl adheres to the [Arctic Ice Studio Git Style Guide][gh-styleguide-git]. - -[![][gh-styleguide-git-badge]][gh-styleguide-git] - -The style guide assumes that you are familiar with the [GitHub Flow][ghg-flow] branching model. +tmpl adheres to the [Arctic Ice Studio Git Style Guide][gh-styleguide-git]. The style guide assumes that you are familiar with the [GitHub Flow][ghg-flow] branching model. ## MCVE @@ -153,7 +145,7 @@ When [reporting a bug](#bug-reports), sometimes even when [suggesting enhancemen - …Complete – Provide all parts needed to reproduce the behavior - …Verifiable – Test the code you're about to provide to make sure it reproduces the behavior -A MCVE is a common practice like on [Stack Overflow][stackoverflow-mcve] and sometimes it is also called [SSCCE][sscce], a _Short, Self Contained, Correct (Compilable), Example_. +A MCVE is a common practice like on [Stack Overflow][stackoverflow-mcve] and sometimes it is also called [SSCCE][], a _Short, Self Contained, Correct (Compilable), Example_. The recommended way for GitHub based projects is to create it as [Gist][gh-gist] or new repository, but of course you can [attach it to issues and pull requests as files][ghd-attach-file], use any free code paste- or file hosting service or paste the code in [Markdown code blocks][ghd-markdown-code-blocks] into the issue. @@ -205,11 +197,8 @@ Thanks for the inspirations and attributions to GitHub's [Open Source Guides][os [gh-pr]: https://github.com/svengreb/tmpl/pulls [gh-profile-repo-search]: https://github.com/svengreb?&tab=repositories&q=tmpl [gh-releases-latest]: https://github.com/svengreb/tmpl/releases/latest -[gh-styleguide-git-badge]: https://raw.githubusercontent.com/arcticicestudio/styleguide-git/develop/assets/styleguide-git-banner-typography-badge.svg?sanitize=true [gh-styleguide-git]: https://github.com/arcticicestudio/styleguide-git -[gh-styleguide-javascript-badge]: https://raw.githubusercontent.com/arcticicestudio/styleguide-javascript/develop/assets/styleguide-javascript-banner-typography-badge.svg?sanitize=true [gh-styleguide-javascript]: https://github.com/arcticicestudio/styleguide-javascript -[gh-styleguide-markdown-badge]: https://raw.githubusercontent.com/arcticicestudio/styleguide-markdown/develop/assets/styleguide-markdown-banner-typography-badge.svg?sanitize=true [gh-styleguide-markdown]: https://github.com/arcticicestudio/styleguide-markdown [gh-tmpl]: https://github.com/svengreb/tmpl [ghd-attach-file]: https://docs.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests diff --git a/README.md b/README.md index 7310cfd..5d98ee2 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ The [`.github/PULL_REQUEST_TEMPLATE.md`][gh-docs-comm-pr_tmpl] file is automatic #### CI/CD Action Workflow The [GitHub Actions][gh-feat-actions] `.github/workflows` directory includes a basic [CI/CD workflow file][gh-docs-act-ref-syntax] that runs for changes in the Git `main` branch and `v*` tags. There is currently one job called `lint-node` that runs all linters that are included in this template repository. See sections like [“Automatic Code and Text Formatter“](#automatic-code-and-text-formatter), [“Markdown Linting“](#markdown-linting) and [“Automatic Pre-Commit Linting“](#automatic-pre-commit-linting) below for more details. +To skip a workflow, include a [supported keyword like `[skip actions]`][gh-blog-cl-skip_actions] in a commit message. #### Automated Dependency Updates @@ -190,7 +191,7 @@ There are multiple ways to use this template repository, either by [using GitHub 1. Adjust the [`.github/CODEOWNERS`][gh-blob-codeowners] and [`.mailmap`][gh-blob-mailmap] files to use mappings for your project contributors and team members. 2. Adjust [files related to GitHub features](#github) like the [CI/CD action workflow](#cicd-action-workflow), [issue](#issue-templates) & [pull request](#pull-request-template) templates, [code owners](#code-owners) and any other file located in the [`github` directory][gh-tree-dot_github] to match your project. -3. Adjust documentations like the [README][gh-blob-readme], [changelog][gh-blob-changelog], [code of conduct][gh-blob-coc] and [contribution guides][gh-blob-contrib] to match your project. +3. Adjust documentations like the [README][gh-blob-readme], [changelog][gh-blob-changelog], [code of conduct][gh-blob-coc] and [contribution guides][contrib-guide] to match your project. 4. Adjust the [`package.json`][gh-blob-pkg.json] file to match your project. 5. Adjust the [`dependabot.yml`][gh-blob-dot_github-dependabot.yml] file to match your project. 6. Adjust all copyright notices to match your project. @@ -229,12 +230,12 @@ The guide also includes information about [minimal, complete, and verifiable exa [gh-blob-changelog]: https://github.com/svengreb/tmpl/blob/main/CHANGELOG.md [gh-blob-coc]: https://github.com/svengreb/tmpl/blob/main/CODE_OF_CONDUCT.md [gh-blob-codeowners]: https://github.com/svengreb/tmpl/blob/main/.github/CODEOWNERS -[gh-blob-contrib]: https://github.com/svengreb/tmpl/blob/main/CONTRIBUTING.md [gh-blob-dot_github-dependabot.yml]: https://github.com/svengreb/tmpl-go/blob/main/.github/dependabot.yml [gh-blob-license]: https://github.com/svengreb/tmpl/blob/main/LICENSE [gh-blob-mailmap]: https://github.com/svengreb/tmpl/blob/main/.mailmap [gh-blob-pkg.json]: https://github.com/svengreb/tmpl/blob/main/package.json [gh-blob-readme]: https://github.com/svengreb/tmpl/blob/main/README.md +[gh-blog-cl-skip_actions]: https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci [gh-blog-dependabot]: https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot [gh-docs-act-ref-syntax]: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions [gh-docs-act]: https://docs.github.com/en/free-pro-team@latest/actions diff --git a/lint-staged.config.js b/lint-staged.config.js index 07ba117..4e7dd5a 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -4,11 +4,11 @@ */ /** - * The configuration for lint-staged. + * Configurations for lint-staged. * * @see https://github.com/okonet/lint-staged#configuration */ module.exports = { - "*": "prettier --check", - "*.md": "remark --no-stdout", + "*.{css,html,js,json,yaml,yml}": "prettier --check", + "*.md": ["remark --no-stdout", "prettier --check"], }; diff --git a/package.json b/package.json index 9fb8cc9..ebb5a2c 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,12 @@ "bugs": { "url": "https://github.com/svengreb/tmpl/issues" }, + "license": "MIT", + "private": true, "engines": { - "node": "^15.13.0", - "npm": "^7.7.0" + "node": ">=15.13", + "npm": ">=7.7" }, - "private": true, - "license": "MIT", "scripts": { "format": "run-s format:pretty", "format:pretty": "prettier --write .", @@ -27,11 +27,11 @@ "prepare": "run-s prepare:*" }, "devDependencies": { + "@arcticicestudio/remark-preset-lint": ">=0.4.0 <1.0.0", "husky": "^6.0.0", "lint-staged": "^10.5.4", "npm-run-all": "^4.1.5", "prettier": "^2.2.1", - "remark-cli": "^9.0.0", - "remark-preset-lint-arcticicestudio": ">=0.3.0 <1.0.0" + "remark-cli": "^9.0.0" } } diff --git a/prettier.config.js b/prettier.config.js index 880885e..920dd0b 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -4,7 +4,7 @@ */ /** - * The configuration for Prettier. + * Configurations for Prettier. * * @see https://prettier.io/docs/en/configuration.html * @see https://prettier.io/docs/en/options.html