Lint rule: require `windowsHide: true` on every child_process call in production source
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- eslint, node.js, typescript
- Domain
- testing-qa, tooling
Research direction
Read the existing oxlint-plugin-teamai rules, using home-env.js as the small example, and inspect ruleHarness fixtures plus .oxlintrc.json. Start by checking how the plugin handles production source and suppression reasons; the issue leaves a decision about options passed through variables. Done means the rule is enabled, fixtures cover each handled call shape, and the stated lint and Vitest commands pass; the linked pull request is already open.
Written by the indexing model from the issue text.
Description
Problem
A child process started on Windows without windowsHide: true opens a visible console window. teamai starts many processes from hooks, so every missed call site shows up as windows popping up during normal use. This has been fixed call site by call site four times: #506, #672, #686 and #1747. Each fix covered the sites known at the time, and the next one appeared later.
A missed site is still present on main: whereOnWindows in src/utils/cli-path.ts calls execFileSync('where', ...) without windowsHide, and it runs inside background hook passes.
Nothing enforces the option today, so the next new spawn can miss it again.
Proposal
Add a teamai/* rule in oxlint-plugin-teamai that reports a node:child_process call (spawn, spawnSync, execFile, execFileSync, exec, execSync, fork) in production source when its options do not set windowsHide: true. Follow the existing rules (home-env.js is a small example) and test it with ruleHarness fixtures.
AGENTS.md ("Testing before a PR") says import boundaries, banned APIs and required options belong in this plugin, not in source-scanning tests.
Points to settle in the PR:
- An options object that is built elsewhere and passed as a variable: either require a shared helper that sets the option, or report it so the author makes it explicit. Pick one and say why.
- A call site that must show a window on purpose (if any exists) uses the repository's suppression convention with a reason (
teamai/suppression-reason). - Processes started through
simple-gitare out of scope for this issue.
Acceptance criteria
npm run lintfails on a productionchild_processcall withoutwindowsHide: true, with a message that names the option.npm run lintpasses onmainafter the PR, with every existing site fixed or suppressed with a reason;whereOnWindowsis fixed.- Test files under
src/__tests__/are not checked by the rule.
Definition of done
- Rule and
ruleHarnessfixtures (one passing and one failing case for each call shape the rule handles). - The rule is enabled in
.oxlintrc.json. npm run lintandnpx vitest run oxlint-plugin-teamaipass.- Fixing the flagged sites changes runtime code, so the PR carries one real-CLI record (AGENTS.md "Testing before a PR"): a command that reaches a fixed site, run after
npm run build.
- Dominant language
- TypeScript
- Stars
- 5.7k
- Forks
- 486
- Avg merge
- 13h 3m
- Merged PRs (30d)
- 474
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tencent/teamai-cli
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 38/100
Tencent/teamai-cli#1753 · 2 comments ·
Maintainers usually reply within 1 day
-
[bug] Stop-hook updater reports skipped or failed updates as ok and repeats unsupported-install warningsPossibly taken @YogeLiu claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Tencent/teamai-cli#1752 · 1 comment ·
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 5/5 Over a week Newbie friendliness 32/100
Tencent/teamai-cli#1743 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
Tencent/teamai-cli#1722 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 38/100
Tencent/teamai-cli#1721 ·
Maintainers usually reply within 1 day
All issues in Tencent/teamai-cli
Similar issues
-
Add: ESP 2 ROOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't applyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wso2/integration-control-plane#1118 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UTDNebula/utd-notebook#311 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day