feat: modernize workflows and standardize configuration files (#85)

This commit is contained in:
2025-12-02 12:50:42 +02:00
committed by GitHub
parent 6027501f24
commit 6dd157f35b
23 changed files with 4365 additions and 6000 deletions

View File

@@ -33,15 +33,15 @@ fullest extent, we want to know.
The following behaviors are expected and requested of all community members:
* Participate in an authentic and active way. In doing so, you contribute to the
- Participate in an authentic and active way. In doing so, you contribute to the
health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert
- Exercise consideration and respect in your speech and actions.
- Attempt collaboration before conflict.
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
- Be mindful of your surroundings and of your fellow participants. Alert
community leaders if you notice a dangerous situation, someone in distress, or
violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public;
- Remember that community event venues may be shared with members of the public;
please be respectful to all patrons of these locations.
## 4. Unacceptable Behavior
@@ -49,23 +49,23 @@ The following behaviors are expected and requested of all community members:
The following behaviors are considered harassment and are unacceptable within
our community:
* Violence, threats of violence or violent language directed against another
- Violence, threats of violence or violent language directed against another
person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory
jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people's personally identifying
- Posting or displaying sexually explicit or violent material.
- Posting or threatening to post other people's personally identifying
information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation,
- Personal insults, particularly those related to gender, sexual orientation,
race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone's consent before
- Inappropriate photography or recording.
- Inappropriate physical contact. You should have someone's consent before
touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes;
- Unwelcome sexual attention. This includes, sexualized comments or jokes;
inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
- Deliberate intimidation, stalking or following (online or in person).
- Advocating for, or encouraging, any of the above behavior.
- Sustained disruption of community events, including talks and presentations.
## 5. Weapons Policy
@@ -133,10 +133,10 @@ under a [Creative Commons Attribution-ShareAlike license][cc-by-sa].
Portions of text derived from the [Django Code of Conduct][django] and
the [Geek Feminism Anti-Harassment Policy][geek-feminism].
* _Revision 2.3. Posted 6 March 2017._
* _Revision 2.2. Posted 4 February 2016._
* _Revision 2.1. Posted 23 June 2014._
* _Revision 2.0, adopted by the [Stumptown Syndicate][stumptown] board on 10
- _Revision 2.3. Posted 6 March 2017._
- _Revision 2.2. Posted 4 February 2016._
- _Revision 2.1. Posted 23 June 2014._
- _Revision 2.0, adopted by the [Stumptown Syndicate][stumptown] board on 10
January 2013. Posted 17 March 2013._
[stumptown]: https://github.com/stumpsyn

View File

@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ivuorinen
---
**Describe the bug**
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ivuorinen
---
**Is your feature request related to a problem? Please describe.**

View File

@@ -15,11 +15,11 @@ name: "CodeQL Advanced"
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '22 8 * * 0'
- cron: "22 8 * * 0"
jobs:
analyze:
@@ -45,11 +45,11 @@ jobs:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language':
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language':
# 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
@@ -59,45 +59,45 @@ jobs:
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
with:
category: "/language:${{matrix.language}}"

View File

@@ -22,16 +22,22 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
issues: write
packages: read
pull-requests: write
statuses: write
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install and enable corepack
shell: sh
run: npm install -g corepack --force && corepack enable
- name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
with:
@@ -42,7 +48,7 @@ jobs:
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
uses: ivuorinen/actions/pr-lint@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.01
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -26,7 +26,7 @@ jobs:
steps:
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
uses: ivuorinen/actions/pr-lint@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.01
publish:
name: Publish
@@ -41,7 +41,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
@@ -53,6 +53,10 @@ jobs:
registry-url: "https://registry.npmjs.org"
scope: "@ivuorinen"
- name: Install and enable corepack
shell: sh
run: npm install -g corepack --force && corepack enable
- name: Cache Node Modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache
@@ -66,7 +70,7 @@ jobs:
run: yarn install
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -4,7 +4,7 @@ name: Stale
on:
schedule:
- cron: '0 8 * * *' # Every day at 08:00
- cron: "0 8 * * *" # Every day at 08:00
workflow_call:
workflow_dispatch:
@@ -23,4 +23,4 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: ivuorinen/actions/stale@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
- uses: ivuorinen/actions/stale@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.01

View File

@@ -8,10 +8,10 @@ on:
- main
- master
paths:
- '.github/labels.yml'
- '.github/workflows/sync-labels.yml'
- ".github/labels.yml"
- ".github/workflows/sync-labels.yml"
schedule:
- cron: '34 5 * * *' # Run every day at 05:34 AM UTC
- cron: "34 5 * * *" # Run every day at 05:34 AM UTC
workflow_call:
workflow_dispatch:
merge_group:
@@ -34,8 +34,8 @@ jobs:
steps:
- name: ⤵️ Checkout Repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: ⤵️ Sync Latest Labels Definitions
uses: ivuorinen/actions/sync-labels@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
uses: ivuorinen/actions/sync-labels@a52399cf74eac2b0963591ab2c6c8eb0f7f50b2d # v2025.12.01

View File

@@ -42,13 +42,13 @@ repos:
rev: v0.11.0
hooks:
- id: shellcheck
args: ['--severity=warning']
args: ["--severity=warning"]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.9
hooks:
- id: actionlint
args: ['-shellcheck=']
args: ["-shellcheck="]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 42.26.11
@@ -56,8 +56,8 @@ repos:
- id: renovate-config-validator
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.495'
rev: "3.2.495"
hooks:
- id: checkov
args:
- '--quiet'
- "--quiet"

View File

@@ -1 +0,0 @@
"@ivuorinen/prettier-config"

19
.releaserc.cjs Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
module.exports = {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
changelogTitle:
"# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.",
},
],
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git",
],
preset: "angular",
};

View File

@@ -1,3 +0,0 @@
{
"extends": ["@ivuorinen/semantic-release-config"]
}

6
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"sonarlint.connectedMode.project": {
"connectionId": "ivuorinen",
"projectKey": "ivuorinen_config-checker"
}
}

View File

@@ -14,4 +14,4 @@ rules:
empty-lines:
max: 1
max-start: 0
max-end: 1
max-end: 1

View File

@@ -5,38 +5,36 @@ All notable changes to this project will be documented in this file. See
# 1.0.0 (2025-10-10)
### Bug Fixes
* **ci:** .npmrc with token as an env ([316f897](https://github.com/ivuorinen/config-checker/commit/316f8976106a3ce161751b4a254dd634bea99707))
* **ci:** add NPM_TOKEN to publish ([f144f27](https://github.com/ivuorinen/config-checker/commit/f144f2771f7dec9d928a2d8ea9b2cf9435147c73))
* **ci:** publish.yml tweaks ([cebafd2](https://github.com/ivuorinen/config-checker/commit/cebafd26a97fb59a4507f376119ed662d9c68aff))
* **ci:** release pat ([e78ab2a](https://github.com/ivuorinen/config-checker/commit/e78ab2ac4854aee14b809da26e0be0876c83b047))
* **ci:** switch to cycjimmy/semantic-release-action ([6ce643c](https://github.com/ivuorinen/config-checker/commit/6ce643cdcb8fb57d37d0117c45e8cf1c9e242dcc))
* **ci:** update publish pipeline permissions ([#6](https://github.com/ivuorinen/config-checker/issues/6)) ([1947d77](https://github.com/ivuorinen/config-checker/commit/1947d7785451ab82ab43c8ff180bfe1c0f310e43))
* **github-action:** update actions/cache (v4.2.3 → v4.2.4) ([#15](https://github.com/ivuorinen/config-checker/issues/15)) ([738b712](https://github.com/ivuorinen/config-checker/commit/738b7129d9b9ef607c5b0b00a226070e426cd5a7))
* **github-action:** update ivuorinen/actions (25.6.23 → 25.6.25) ([#5](https://github.com/ivuorinen/config-checker/issues/5)) ([08563a1](https://github.com/ivuorinen/config-checker/commit/08563a10d1d61ff6d1fe86e6fcc4ad9936d2633a))
* **github-action:** update ivuorinen/actions (25.6.25 → 25.6.30) ([#7](https://github.com/ivuorinen/config-checker/issues/7)) ([7e367c7](https://github.com/ivuorinen/config-checker/commit/7e367c7a3d97360efd9902b7307383c9416d45b6))
* **github-action:** update ivuorinen/actions (25.7.14 → 25.7.21) ([#11](https://github.com/ivuorinen/config-checker/issues/11)) ([dc1599d](https://github.com/ivuorinen/config-checker/commit/dc1599db1fd2e114dbe2696b9b7ebb9dcc7c2a52))
* **github-action:** update ivuorinen/actions (25.7.21 → 25.7.28) ([#12](https://github.com/ivuorinen/config-checker/issues/12)) ([3fb1101](https://github.com/ivuorinen/config-checker/commit/3fb110185819fe2808a6f4476f8cc8b3750f1877))
* **github-action:** update ivuorinen/actions (25.7.7 → 25.7.14) ([#10](https://github.com/ivuorinen/config-checker/issues/10)) ([885a9fd](https://github.com/ivuorinen/config-checker/commit/885a9fd1802b704e756683a4999876b203d7d219))
* **github-action:** update ivuorinen/actions (25.8.18 → 25.8.21) ([#21](https://github.com/ivuorinen/config-checker/issues/21)) ([7348f3a](https://github.com/ivuorinen/config-checker/commit/7348f3a4d2bccf0c3bb1ec88f1a5b0489abed8c0))
* **github-action:** update ivuorinen/actions (25.8.4 → 25.8.18) ([#17](https://github.com/ivuorinen/config-checker/issues/17)) ([391c1f5](https://github.com/ivuorinen/config-checker/commit/391c1f54430bd06cc2d42538fa7a5f6e91db6f3c))
* **github-release:** update adrienverge/yamllint (v1.37.0 → v1.37.1) ([#19](https://github.com/ivuorinen/config-checker/issues/19)) ([89ae36c](https://github.com/ivuorinen/config-checker/commit/89ae36c0ff5b46df2ef1ab8657b0b86d18dfc6c1))
* **github-release:** update bridgecrewio/checkov (3.2.400 → 3.2.464) ([#20](https://github.com/ivuorinen/config-checker/issues/20)) ([8ea111d](https://github.com/ivuorinen/config-checker/commit/8ea111de5f44540a1b8730f0884f9762629a2663))
* **github-release:** update renovatebot/pre-commit-hooks (41.82.6 → 41.82.9) ([#28](https://github.com/ivuorinen/config-checker/issues/28)) ([92e53c4](https://github.com/ivuorinen/config-checker/commit/92e53c49cd5c3b6708acfaa32c6e147a648abac6))
* **lint:** .mega-linter.yml too many empty lines ([52cbe31](https://github.com/ivuorinen/config-checker/commit/52cbe31c40a5fc9903bb261a474b48bc1bbd1165))
- **ci:** .npmrc with token as an env ([316f897](https://github.com/ivuorinen/config-checker/commit/316f8976106a3ce161751b4a254dd634bea99707))
- **ci:** add NPM_TOKEN to publish ([f144f27](https://github.com/ivuorinen/config-checker/commit/f144f2771f7dec9d928a2d8ea9b2cf9435147c73))
- **ci:** publish.yml tweaks ([cebafd2](https://github.com/ivuorinen/config-checker/commit/cebafd26a97fb59a4507f376119ed662d9c68aff))
- **ci:** release pat ([e78ab2a](https://github.com/ivuorinen/config-checker/commit/e78ab2ac4854aee14b809da26e0be0876c83b047))
- **ci:** switch to cycjimmy/semantic-release-action ([6ce643c](https://github.com/ivuorinen/config-checker/commit/6ce643cdcb8fb57d37d0117c45e8cf1c9e242dcc))
- **ci:** update publish pipeline permissions ([#6](https://github.com/ivuorinen/config-checker/issues/6)) ([1947d77](https://github.com/ivuorinen/config-checker/commit/1947d7785451ab82ab43c8ff180bfe1c0f310e43))
- **github-action:** update actions/cache (v4.2.3 → v4.2.4) ([#15](https://github.com/ivuorinen/config-checker/issues/15)) ([738b712](https://github.com/ivuorinen/config-checker/commit/738b7129d9b9ef607c5b0b00a226070e426cd5a7))
- **github-action:** update ivuorinen/actions (25.6.23 → 25.6.25) ([#5](https://github.com/ivuorinen/config-checker/issues/5)) ([08563a1](https://github.com/ivuorinen/config-checker/commit/08563a10d1d61ff6d1fe86e6fcc4ad9936d2633a))
- **github-action:** update ivuorinen/actions (25.6.25 → 25.6.30) ([#7](https://github.com/ivuorinen/config-checker/issues/7)) ([7e367c7](https://github.com/ivuorinen/config-checker/commit/7e367c7a3d97360efd9902b7307383c9416d45b6))
- **github-action:** update ivuorinen/actions (25.7.14 → 25.7.21) ([#11](https://github.com/ivuorinen/config-checker/issues/11)) ([dc1599d](https://github.com/ivuorinen/config-checker/commit/dc1599db1fd2e114dbe2696b9b7ebb9dcc7c2a52))
- **github-action:** update ivuorinen/actions (25.7.21 → 25.7.28) ([#12](https://github.com/ivuorinen/config-checker/issues/12)) ([3fb1101](https://github.com/ivuorinen/config-checker/commit/3fb110185819fe2808a6f4476f8cc8b3750f1877))
- **github-action:** update ivuorinen/actions (25.7.7 → 25.7.14) ([#10](https://github.com/ivuorinen/config-checker/issues/10)) ([885a9fd](https://github.com/ivuorinen/config-checker/commit/885a9fd1802b704e756683a4999876b203d7d219))
- **github-action:** update ivuorinen/actions (25.8.18 → 25.8.21) ([#21](https://github.com/ivuorinen/config-checker/issues/21)) ([7348f3a](https://github.com/ivuorinen/config-checker/commit/7348f3a4d2bccf0c3bb1ec88f1a5b0489abed8c0))
- **github-action:** update ivuorinen/actions (25.8.4 → 25.8.18) ([#17](https://github.com/ivuorinen/config-checker/issues/17)) ([391c1f5](https://github.com/ivuorinen/config-checker/commit/391c1f54430bd06cc2d42538fa7a5f6e91db6f3c))
- **github-release:** update adrienverge/yamllint (v1.37.0 → v1.37.1) ([#19](https://github.com/ivuorinen/config-checker/issues/19)) ([89ae36c](https://github.com/ivuorinen/config-checker/commit/89ae36c0ff5b46df2ef1ab8657b0b86d18dfc6c1))
- **github-release:** update bridgecrewio/checkov (3.2.400 → 3.2.464) ([#20](https://github.com/ivuorinen/config-checker/issues/20)) ([8ea111d](https://github.com/ivuorinen/config-checker/commit/8ea111de5f44540a1b8730f0884f9762629a2663))
- **github-release:** update renovatebot/pre-commit-hooks (41.82.6 → 41.82.9) ([#28](https://github.com/ivuorinen/config-checker/issues/28)) ([92e53c4](https://github.com/ivuorinen/config-checker/commit/92e53c49cd5c3b6708acfaa32c6e147a648abac6))
- **lint:** .mega-linter.yml too many empty lines ([52cbe31](https://github.com/ivuorinen/config-checker/commit/52cbe31c40a5fc9903bb261a474b48bc1bbd1165))
### Features
* **ci:** update codeql ([#3](https://github.com/ivuorinen/config-checker/issues/3)) ([18f0015](https://github.com/ivuorinen/config-checker/commit/18f0015ccfeaa6fc576da4779f1ba681d6949de3))
* **github-action:** update actions/checkout (v4.2.2 → v4.3.0) ([#18](https://github.com/ivuorinen/config-checker/issues/18)) ([0f7f989](https://github.com/ivuorinen/config-checker/commit/0f7f989c5db1052055dabf2de67517addfed142d))
* **github-action:** update ivuorinen/actions (25.6.30 → 25.7.7) ([#8](https://github.com/ivuorinen/config-checker/issues/8)) ([cb09795](https://github.com/ivuorinen/config-checker/commit/cb09795ba4ab6927c9df7f39ee2836369474bea4))
* **github-action:** update ivuorinen/actions (25.7.28 → 25.8.4) ([#14](https://github.com/ivuorinen/config-checker/issues/14)) ([7783dc8](https://github.com/ivuorinen/config-checker/commit/7783dc8c36350fd2e32458adb71abbc19595300d))
* **github-release:** update igorshubovych/markdownlint-cli (v0.44.0 → v0.45.0) ([#22](https://github.com/ivuorinen/config-checker/issues/22)) ([20be1f2](https://github.com/ivuorinen/config-checker/commit/20be1f2ea720ce5edc2e4ca73b50f0bd6d88a0a3))
* **github-release:** update koalaman/shellcheck-precommit (v0.10.0 → v0.11.0) ([#23](https://github.com/ivuorinen/config-checker/issues/23)) ([a95abdb](https://github.com/ivuorinen/config-checker/commit/a95abdb1c2d4fb8cb2edf5bb1b61ebcf5436abe6))
* initial import from base-configs ([2c000e8](https://github.com/ivuorinen/config-checker/commit/2c000e8e7eeedce4e976f1e9783384074cbc987c))
- **ci:** update codeql ([#3](https://github.com/ivuorinen/config-checker/issues/3)) ([18f0015](https://github.com/ivuorinen/config-checker/commit/18f0015ccfeaa6fc576da4779f1ba681d6949de3))
- **github-action:** update actions/checkout (v4.2.2 → v4.3.0) ([#18](https://github.com/ivuorinen/config-checker/issues/18)) ([0f7f989](https://github.com/ivuorinen/config-checker/commit/0f7f989c5db1052055dabf2de67517addfed142d))
- **github-action:** update ivuorinen/actions (25.6.30 → 25.7.7) ([#8](https://github.com/ivuorinen/config-checker/issues/8)) ([cb09795](https://github.com/ivuorinen/config-checker/commit/cb09795ba4ab6927c9df7f39ee2836369474bea4))
- **github-action:** update ivuorinen/actions (25.7.28 → 25.8.4) ([#14](https://github.com/ivuorinen/config-checker/issues/14)) ([7783dc8](https://github.com/ivuorinen/config-checker/commit/7783dc8c36350fd2e32458adb71abbc19595300d))
- **github-release:** update igorshubovych/markdownlint-cli (v0.44.0 → v0.45.0) ([#22](https://github.com/ivuorinen/config-checker/issues/22)) ([20be1f2](https://github.com/ivuorinen/config-checker/commit/20be1f2ea720ce5edc2e4ca73b50f0bd6d88a0a3))
- **github-release:** update koalaman/shellcheck-precommit (v0.10.0 → v0.11.0) ([#23](https://github.com/ivuorinen/config-checker/issues/23)) ([a95abdb](https://github.com/ivuorinen/config-checker/commit/a95abdb1c2d4fb8cb2edf5bb1b61ebcf5436abe6))
- initial import from base-configs ([2c000e8](https://github.com/ivuorinen/config-checker/commit/2c000e8e7eeedce4e976f1e9783384074cbc987c))
# Change Log

View File

@@ -35,9 +35,7 @@ const foundConfig = checkConfig("commitlint");
if (foundConfig.length > 0) {
console.log("commitlint-config: Found existing commitlint config file, skipping creation.");
console.log(
"commitlint-config: If you want to create a new config file, please remove the existing one.",
);
console.log("commitlint-config: If you want to create a new config file, please remove the existing one.");
console.log(`commitlint-config: Found config files at: ${foundConfig.join(", ")}`);
process.exit(0);
}

View File

@@ -1,10 +1,10 @@
/* eslint no-console: "off" -- CLI app that gives users feedback */
const path = require('node:path')
const configChecker = require('..')
const assert = require('node:assert').strict
const path = require("node:path");
const configChecker = require("..");
const assert = require("node:assert").strict;
const configs = configChecker('test', path.join(__dirname, 'fixtures'))
const configs = configChecker("test", path.join(__dirname, "fixtures"));
/**
* Checks if an array contains a file.
@@ -12,9 +12,9 @@ const configs = configChecker('test', path.join(__dirname, 'fixtures'))
* @param {string} file The file to check for.
* @returns {boolean} - True if the array contains the file.
*/
const arrayContains = (c = [], file = '') => c.includes(file)
const arrayContains = (c = [], file = "") => c.includes(file);
assert.ok(arrayContains(configs, '.testrc'))
assert.ok(arrayContains(configs, '.config/testrc.ts'))
assert.ok(arrayContains(configs, ".testrc"));
assert.ok(arrayContains(configs, ".config/testrc.ts"));
console.info('configChecker tests passed')
console.info("configChecker tests passed");

View File

@@ -1,4 +1,4 @@
import ivuorinenConfig from '@ivuorinen/eslint-config'
import ivuorinenConfig from "@ivuorinen/eslint-config";
export default [
...ivuorinenConfig,
@@ -7,6 +7,6 @@ export default [
{
rules: {
// "no-unused-vars": "warn"
}
}
]
},
},
];

View File

@@ -1,19 +1,19 @@
/* eslint no-console: "off" -- This is a cli app that generates cli output */
const configurationPaths = require('../lib/configuration-paths')
const configurationPaths = require("../lib/configuration-paths");
const configItems = configurationPaths('`[module name]`')
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b), 0).length
const configItems = configurationPaths("`[module name]`");
const longestLine = configItems.reduce((a, b) => (a.length > b.length ? a : b), 0).length;
const mdTable = configItems.map(file => {
const diff = longestLine - file.length
return `| ${file}${' '.repeat(diff)} |`
})
const mdTable = configItems.map((file) => {
const diff = longestLine - file.length;
return `| ${file}${" ".repeat(diff)} |`;
});
console.log('# Configuration files\n')
console.log("# Configuration files\n");
const header = 'Searched configuration files'
console.log(`| ${header}${' '.repeat(longestLine - header.length)} |`)
console.log(`| ${'-'.repeat(longestLine)} |`)
const header = "Searched configuration files";
console.log(`| ${header}${" ".repeat(longestLine - header.length)} |`);
console.log(`| ${"-".repeat(longestLine)} |`);
mdTable.forEach(line => console.log(line))
mdTable.forEach((line) => console.log(line));

View File

@@ -1,10 +1,10 @@
/* eslint no-console: "off", n/no-process-exit: "off" -- CLI app that gives users feedback */
const fs = require('node:fs')
const path = require('node:path')
const fs = require("node:fs");
const path = require("node:path");
// noinspection NpmUsedModulesInstalled
const process = require('node:process')
const configurationPaths = require('./configuration-paths')
const process = require("node:process");
const configurationPaths = require("./configuration-paths");
/**
* Checks for the existence of a configuration file.
@@ -12,21 +12,21 @@ const configurationPaths = require('./configuration-paths')
* @param {string} pathPrefix The prefix to add to the path.
* @returns {string[]} - The paths to the configuration files.
*/
const configChecker = (moduleName, pathPrefix = '') => {
let searchPath = process.env.INIT_CWD
const configChecker = (moduleName, pathPrefix = "") => {
let searchPath = process.env.INIT_CWD;
if (pathPrefix.length > 0) {
searchPath = pathPrefix
searchPath = pathPrefix;
}
const allFiles = configurationPaths(moduleName)
const allFiles = configurationPaths(moduleName);
if (process.env.DEBUG) {
const filesWithPath = allFiles.map(file => path.join(searchPath, file))
console.log(filesWithPath)
const filesWithPath = allFiles.map((file) => path.join(searchPath, file));
console.log(filesWithPath);
}
// Look for config files in defined search path, and return found.
return allFiles.filter(file => fs.existsSync(path.join(searchPath, file)))
}
return allFiles.filter((file) => fs.existsSync(path.join(searchPath, file)));
};
module.exports = configChecker
module.exports = configChecker;

View File

@@ -1,11 +1,11 @@
const path = require('node:path')
const path = require("node:path");
/**
* Returns an array of configuration paths.
* @param {string} moduleName The name of the module to check for.
* @returns {string[]} - The paths to the configuration files.
*/
const configurationPaths = moduleName => {
const configurationPaths = (moduleName) => {
const filesPlain = [
moduleName,
`${moduleName}rc`,
@@ -22,14 +22,14 @@ const configurationPaths = moduleName => {
`${moduleName}.config.js`,
`${moduleName}.config.ts`,
`${moduleName}.config.mjs`,
`${moduleName}.config.cjs`
]
`${moduleName}.config.cjs`,
];
const filesDot = filesPlain.map(file => `.${file}`)
const bothFiles = filesPlain.concat(filesDot)
const filesInConfig = bothFiles.map(file => path.join('.config', file))
const filesDot = filesPlain.map((file) => `.${file}`);
const bothFiles = filesPlain.concat(filesDot);
const filesInConfig = bothFiles.map((file) => path.join(".config", file));
return bothFiles.concat(filesInConfig)
}
return bothFiles.concat(filesInConfig);
};
module.exports = configurationPaths
module.exports = configurationPaths;

View File

@@ -35,20 +35,19 @@
"scripts": {
"test": "node ./__tests__/config-checker.test.js",
"generate-table": "node ./helpers/generate-md-table.js",
"eslint:fix": "eslint '**/*.{js,tsx,ts,mjs,cjs}' --fix",
"eslint:report": "eslint '**/*.{js,tsx,ts,mjs,cjs}'",
"markdownlint:fix": "markdownlint '**/*.md' --fix",
"markdownlint:report": "markdownlint '**/*.md'",
"prettier:fix": "prettier '**/*.{js,tsx,ts,json,mjs,cjs}' --write",
"prettier:report": "prettier '**/*.{js,tsx,ts,json,mjs,cjs}' --check"
"semantic-release": "semantic-release"
},
"bugs": {
"url": "https://github.com/ivuorinen/config-checker/issues"
},
"packageManager": "yarn@4.12.0",
"devDependencies": {
"@ivuorinen/eslint-config": "^0.5.13",
"@ivuorinen/markdownlint-config": "^0.3.16",
"@ivuorinen/prettier-config": "^0.3.12",
"@ivuorinen/semantic-release-config": "^0.3.18"
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^12.0.2",
"@semantic-release/npm": "^13.1.2",
"@semantic-release/release-notes-generator": "^14.1.0",
"semantic-release": "^25.0.2"
}
}

9966
yarn.lock

File diff suppressed because it is too large Load Diff