Skip to content

chore(ci): remove super-linter and add targeted linting#807

Merged
nicomiguelino merged 10 commits into
masterfrom
chore/remove-super-linter
May 26, 2026
Merged

chore(ci): remove super-linter and add targeted linting#807
nicomiguelino merged 10 commits into
masterfrom
chore/remove-super-linter

Conversation

@nicomiguelino
Copy link
Copy Markdown
Contributor

@nicomiguelino nicomiguelino commented May 26, 2026

User description

Summary

  • Remove super-linter/super-linter and all associated config files under .github/linters/
  • Add a run-simple-checks job to edge-app-checks.yml for Edge Apps without a build system, covering formatting (Prettier), Markdown (markdownlint-cli2), HTML (htmlhint), CSS (stylelint), and JavaScript (eslint)
  • Rename run-checks to run-full-checks to contrast with the new run-simple-checks job
  • Add edge-apps/.stylelintrc.json with minimal built-in stylelint rules
  • Document linting and formatting commands in edge-apps/README.md

Edge App linting and formatting were already handled per-app by edge-app-checks.yml via Bun. This replaces the remaining coverage super-linter provided with targeted tools.


PR Type

Enhancement, Documentation


Description

  • Replace Super Linter with targeted checks

  • Split Edge App CI by build system

  • Add Stylelint config and linting docs


Diagram Walkthrough

flowchart LR
  A["Changed Edge Apps"]
  B["Detect build system"]
  C["Full checks"]
  D["Simple checks"]
  E["Summary"]
  A -- "detect" --> B
  B -- "has package.json" --> C
  B -- "no package.json" --> D
  C -- "result" --> E
  D -- "result" --> E
Loading

File Walkthrough

Relevant files
Documentation
2 files
edge-apps.md
Remove Super Linter reference from CSS guidance                   
+1/-2     
README.md
Document Edge App linting commands                                             
+32/-0   
Configuration changes
7 files
.jscpd.json
Remove JSCPD duplication linter configuration                       
+0/-13   
.prettierrc.json
Remove legacy Super Linter Prettier config                             
+0/-4     
.textlintrc
Remove legacy textlint configuration file                               
+0/-10   
.yamllint.yml
Remove legacy YAML lint configuration                                       
+0/-9     
stylelint.config.cjs
Remove legacy Stylelint Super Linter config                           
+0/-11   
linter.yml
Remove Super Linter GitHub Actions workflow                           
+0/-79   
.stylelintrc.json
Add minimal Stylelint rules for Edge Apps                               
+10/-0   
Enhancement
1 files
edge-app-checks.yml
Add simple checks for non-build apps                                         
+94/-9   

- Delete `.github/workflows/linter.yml`
- Delete `.github/linters/` and all associated config files
- Edge app linting and formatting are already covered per-app via `edge-app-checks.yml`
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

PR Reviewer Guide 🔍

(Review updated until commit a6070d1)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing Coverage

The simple-app formatting check does not include Markdown files in the Prettier glob, even though the workflow is intended to cover Markdown formatting. A PR that changes only Markdown formatting in an app without a build system will not be caught by this check; only markdownlint rules will run.

- name: Run formatting check
  run: |
    bunx prettier --check \
      --config edge-apps/.prettierrc.json \
      "edge-apps/${{ matrix.app }}/**/*.{html,css,js,json,yml,yaml}"

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Prevent shell command injection

Avoid interpolating matrix.app directly into shell scripts because app names come
from repository paths and shell metacharacters like $() can be evaluated after
GitHub expression expansion. Pass matrix.app through an environment variable and
reference "$APP" in every run step.

.github/workflows/edge-app-checks.yml [207-211]

 - name: Run formatting check
+  env:
+    APP: ${{ matrix.app }}
   run: |
     bunx prettier --check \
       --config edge-apps/.prettierrc.json \
-      "edge-apps/${{ matrix.app }}/**/*.{html,css,js,json,yml,yaml}"
+      "edge-apps/$APP/**/*.{html,css,js,json,yml,yaml}"
Suggestion importance[1-10]: 8

__

Why: This is a valid security concern because ${{ matrix.app }} is derived from repository paths and direct interpolation into run scripts can allow shell metacharacter evaluation. Passing the value through APP and referencing "$APP" avoids re-parsing it as shell syntax.

Medium

- Extend `detect-changes` to track all changed apps, not just those with `package.json`
- Add `no-build-system-check` step and `apps-without-build-system` output
- Add `run-simple-checks` job with formatting, Markdown, HTML, CSS, and JS linting via `bunx`
- Rename `run-checks` to `run-full-checks` to contrast with `run-simple-checks`
- Add `edge-apps/.stylelintrc.json` with minimal built-in rules for CSS linting
- Update `edge-apps/README.md` with linting and formatting instructions
- Remove super-linter reference from `.claude/rules/edge-apps.md`
@nicomiguelino nicomiguelino changed the title chore(ci): remove super-linter chore(ci): remove super-linter and add targeted linting May 26, 2026
- Add `-d` directory check to `add_app_if_valid` to prevent files
  at the `edge-apps/` root (e.g. `.stylelintrc.json`) from being
  treated as app names in the matrix
Temporary whitespace-only changes to README files across all
non-build-system Edge Apps and the clock app to exercise the
`run-simple-checks` and `run-full-checks` CI jobs.

This commit will be reverted once CI results are confirmed.
@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit a6070d1

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Prevent shell command injection

Avoid interpolating matrix.app directly into shell scripts because app names come
from repository paths and shell metacharacters like $() can be evaluated after
GitHub expression expansion. Pass matrix.app through an environment variable and
reference "$APP" in every run step.

.github/workflows/edge-app-checks.yml [207-211]

 - name: Run formatting check
+  env:
+    APP: ${{ matrix.app }}
   run: |
     bunx prettier --check \
       --config edge-apps/.prettierrc.json \
-      "edge-apps/${{ matrix.app }}/**/*.{html,css,js,json,yml,yaml}"
+      "edge-apps/$APP/**/*.{html,css,js,json,yml,yaml}"
Suggestion importance[1-10]: 8

__

Why: This is a valid security concern because ${{ matrix.app }} is derived from repository paths and direct interpolation into run scripts can allow shell metacharacter evaluation. Passing the value through APP and referencing "$APP" avoids re-parsing it as shell syntax.

Medium

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the repository-wide Super Linter workflow and replaces the remaining Edge App lint/format coverage with a targeted “simple checks” job for Edge Apps that don’t use a build system, while keeping the existing Bun-based checks for build-system apps.

Changes:

  • Removed Super Linter workflow and deleted its .github/linters/ configuration files.
  • Updated edge-app-checks.yml to split checks into run-full-checks (apps with package.json) and run-simple-checks (apps without package.json) using Prettier, markdownlint-cli2, htmlhint, stylelint, and eslint.
  • Added a minimal edge-apps/.stylelintrc.json and documented new lint/format commands in edge-apps/README.md.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
edge-apps/README.md Documents how to run linting/formatting locally for apps with and without a build system.
edge-apps/.stylelintrc.json Adds a shared minimal Stylelint ruleset for “no build system” Edge Apps.
.github/workflows/linter.yml Removes the Super Linter workflow entirely.
.github/workflows/edge-app-checks.yml Adds app classification + a new run-simple-checks job and renames run-checksrun-full-checks.
.github/linters/stylelint.config.cjs Removes Super Linter-related Stylelint config.
.github/linters/.yamllint.yml Removes Super Linter-related YAML lint config.
.github/linters/.textlintrc Removes Super Linter-related text lint config.
.github/linters/.prettierrc.json Removes Super Linter-related Prettier config (replaced by edge-apps/.prettierrc.json).
.github/linters/.jscpd.json Removes Super Linter-related duplication config.
.claude/rules/edge-apps.md Removes references to Super Linter and keeps Stylelint guidance.
Comments suppressed due to low confidence (1)

.github/workflows/edge-app-checks.yml:58

  • add_app_if_valid currently accepts any directory under edge-apps/ (except helpers and .bun-create). This will include non-app directories like edge-apps/icons/, creating unnecessary matrix entries and potentially running checks in folders that aren't apps. Consider validating an app directory by presence of screenly.yml/screenly_qc.yml (or package.json) rather than only -d.
          # Function to add app to list if not already included
          add_app_if_valid() {
            local app="$1"
            if [[ -n "$app" && "$app" != "helpers" && "$app" != ".bun-create" ]]; then
              if [[ -d "edge-apps/$app" ]]; then
                if [[ ! " $CHANGED_APPS " =~ $app ]]; then
                  CHANGED_APPS="$CHANGED_APPS $app"
                fi
              fi

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread .github/workflows/edge-app-checks.yml Outdated
Comment thread edge-apps/README.md
Comment thread edge-apps/README.md Outdated
Comment thread edge-apps/README.md Outdated
- Use glob match instead of regex in deduplication check to prevent
  substring collisions (e.g. `powerbi` vs `powerbi-legacy`)
- Add `md` to Prettier glob so Markdown files are included in
  formatting checks
- Replace `echo | xargs` with `find -print0 | xargs -0 -r` in HTML,
  CSS, and JS lint steps for safe handling of filenames
- Add `edge-apps/eslint.config.cjs` as a shared ESLint config for
  apps without a build system
- Update `edge-apps/README.md` to match CI behavior for CSS and JS
  lint examples
Temporary whitespace-only changes to README files across all
non-build-system Edge Apps and the clock app to exercise the
`run-simple-checks` and `run-full-checks` CI jobs.

This commit will be reverted once CI results are confirmed.
Temporarily disabled until formatting is fixed across non-build-system
apps. Will be re-enabled in a follow-up PR.
@nicomiguelino
Copy link
Copy Markdown
Contributor Author

@salmanfarisvp Linting and formatting errors exist across most of the non-build-system Edge Apps. Fixing them all at once would mean a large number of changes with no functional value, so the plan is to address them on a per-app basis whenever an app needs to be touched for other reasons.

@nicomiguelino nicomiguelino merged commit cc03dba into master May 26, 2026
4 checks passed
@nicomiguelino nicomiguelino deleted the chore/remove-super-linter branch May 26, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants