From 8040d9559e3eff3af869d93d23a9f88d2fbc2809 Mon Sep 17 00:00:00 2001 From: Daniel Krook Date: Tue, 28 Oct 2025 16:00:31 -0400 Subject: [PATCH 1/2] Update linter Signed-off-by: Daniel Krook --- src/content/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/en.json b/src/content/en.json index b1536ec..c522ddb 100644 --- a/src/content/en.json +++ b/src/content/en.json @@ -49,6 +49,6 @@ "footerLink": "Call for Code® with The Linux Foundation project", "footer2": ".", "footerLink2": "", - "copyright": "Copyright © 2021-2022 Pyrrha a Series of LF Projects, LLC.", + "copyright": "Copyright © 2021-2025 Pyrrha a Series of LF Projects, LLC.", "copyrightInfo": "For trademark usage guidelines, privacy and cookie policies, and other applicable policies, as well as terms and conditions governing this web site, please see www.lfprojects.org." } From 909571a85024b27eda1127eab19f2b17ed9ef9c9 Mon Sep 17 00:00:00 2001 From: Daniel Krook Date: Tue, 28 Oct 2025 17:09:17 -0400 Subject: [PATCH 2/2] Updates Signed-off-by: Daniel Krook --- .github/workflows/linter.yml | 63 +++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 7f69ff3..0809caf 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,24 +1,65 @@ -name: linter +name: Node.js Linting on: - # Execute on every push to any branch push: - branches: - - "**" - # Execute on every pull request to the master branch + branches: ["**"] pull_request_target: - branches: - - main + branches: [main] jobs: - linter: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up node + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '20' - - run: npm install -g prettier@latest - - run: prettier --check . + cache: 'npm' + + - name: Install dependencies + run: | + if [ -f package.json ]; then + npm install + else + echo "No package.json found, installing global tools only" + fi + + # JavaScript/Node.js Linting + - name: Install linting tools + run: npm install -g prettier eslint dockerfilelint + + - name: Format check with Prettier (using centralized config) + run: | + # Use centralized prettier config if available + if [ -f "../Pyrrha-Development-Tools/configs/.prettierrc.js" ]; then + npx prettier --config ../Pyrrha-Development-Tools/configs/.prettierrc.js --check "**/*.{js,json,md}" + else + npx prettier --check "**/*.{js,json,md}" + fi + + - name: Lint with ESLint (if configured) + run: | + if [ -f .eslintrc.* ] || [ -f eslint.config.* ]; then + npx eslint . || echo "ESLint issues found (non-blocking)" + else + echo "No ESLint configuration found, skipping" + fi + + - name: Run tests (if available) + run: | + if [ -f package.json ] && npm run test --if-present; then + npm test + else + echo "No tests configured, skipping" + fi + + # Dockerfile Linting + - name: Dockerfile linting + run: | + if ls Dockerfile* 1> /dev/null 2>&1; then + dockerfilelint Dockerfile* + else + echo "No Dockerfiles found, skipping" + fi