fix(tooling): cdk/scripts is excluded from eslint, so its eslint-disable directives are inert
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- eslint, typescript
- Domain
- build-system, tooling
Research direction
Start with cdk/eslint.config.mjs:49 and cdk/mise.toml, then run the reproduction commands from the issue against scripts/generate-bootstrap-template.ts. Check the newly linted cdk/scripts files and the five eslint-disable directives, including any rules they expose. Done means the scripts are covered by the project lint task and the directives or resulting violations are intentional and resolved.
Written by the indexing model from the issue text.
Description
Component: cdk (tooling)
Describe the bug
cdk/eslint.config.mjs:49 scopes the TypeScript config to ['src/**/*.ts', 'test/**/*.ts'], so cdk/scripts/ is never linted:
$ npx eslint scripts/generate-bootstrap-template.ts
0:0 warning File ignored because no matching configuration was supplied
Two consequences:
- The
eslint-disabledirectives already in those files are inert.scripts/generate-bootstrap-template.tscarries five of them. They read as deliberate suppressions of real rules, but nothing is being suppressed because no rule ever runs — so a reader can't tell which are load-bearing and which are leftovers. mise //cdk:eslintrunseslint --fix src test, so even widening the config'sfilesglob would not lintscripts/until that task is updated too. Both halves need changing.
This was harmless while scripts/ was write-only tooling invoked by mise. It matters more now: cdk/test/bootstrap/bootstrap-template.test.ts imports buildTemplate() and renderTemplate() from the generator (#867), so generator code is on a test path while sitting outside the lint surface that governs everything else it touches.
Expected behavior
Either cdk/scripts/**/*.ts is linted like src/ and test/, or the exclusion is deliberate and recorded — with the inert eslint-disable comments removed so they don't imply otherwise.
Current behavior
scripts/ is silently unlinted. eslint reports the ignore only as a warning, so mise //cdk:eslint passes and nothing signals the gap.
Reproduction steps
cd cdk
npx eslint scripts/generate-bootstrap-template.ts # "File ignored because no matching configuration"
grep -c eslint-disable scripts/generate-bootstrap-template.ts # 5 inert directives
grep -n "files:" eslint.config.mjs | head -2 # src/** and test/** only
Possible solution
- Add
scripts/**/*.tsto thefilesglob ateslint.config.mjs:49, probably as its own block — scripts are Node-side and may legitimately want different rules than CDK constructs (no-consolebeing the obvious one, since these are CLI tools that print). - Update the
//cdk:eslinttask incdk/mise.tomlfromsrc testto includescripts. - Fix or delete whatever the newly-active rules flag, including the five directives that are currently no-ops.
Worth checking whether cli/ and docs/ have the same gap — //cli:eslint passes src test build-tools, so it may already cover its equivalent.
Notes
Raised by @ayushtr-aws while reviewing #867 as pre-existing and out of scope for that PR. Filing separately as suggested.
Environment
- Commit
e96dc21e(also present well before it — the config predates the PR)
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 46
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 26
Contributor 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 aws-samples/sample-autonomous-cloud-coding-agents
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug v1
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug v1
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
documentation P2 security
Difficulty 2/5 1-2 days Newbie friendliness 74/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 comments ·
All issues in aws-samples/sample-autonomous-cloud-coding-agents
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
bcgov/bc-wallet-mobile#4761 · 1 comment ·
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
refactor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100