Lint action should not run on the entire repository #25

Closed
opened 2026-04-08 21:51:11 +00:00 by aaperis · 0 comments
aaperis commented 2026-04-08 21:51:11 +00:00 (Migrated from github.com)

Describe the bug

From package.json:

  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint .",
    "format": "prettier --check .",
    "format:write": "prettier --write ."
  },

means that the linter action will try to run the last three scripts on all files that are next to package.json. Since the frontend files are at the root of the repo this triggers the scripts on other types of files e.g. docker compose files etc. thus raising errors and causing the action to fail.

This problem has been fixed temporarily by replacing "." with "/src" in the above in #24 but this is not a good fix overall since we want the linters to check all the frontend files, including config files.

The fix would be to move all of the frontend files under a dedicated /frontend folder.

Steps to reproduce

Add a non frontend compatible file in the repo.

Expected behavior

  • workflow yaml remains unchanged
  • linter scripts work on all frontend files including config files outside /src folder.
## Describe the bug From `package.json`: ``` "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "eslint .", "format": "prettier --check .", "format:write": "prettier --write ." }, ``` means that the linter action will try to run the last three scripts on all files that are next to `package.json`. Since the frontend files are at the root of the repo this triggers the scripts on other types of files e.g. docker compose files etc. thus raising errors and causing the action to fail. This problem has been fixed temporarily by replacing "." with "/src" in the above in #24 but this is not a good fix overall since we want the linters to check all the frontend files, including config files. The fix would be to move all of the frontend files under a dedicated `/frontend` folder. ## Steps to reproduce Add a non frontend compatible file in the repo. ## Expected behavior - [ ] workflow yaml remains unchanged - [ ] linter scripts work on all frontend files including config files outside `/src` folder.
Sign in to join this conversation.
No description provided.