Tooling: upgrade ESLint config — autofix pipeline, type-aware rules, surgical rule options
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- eslint, typescript
Research direction
Start with eslint.config.mjs, the lint scripts in package.json, the project VSCode settings, and CI configuration. Read the existing rule overrides and test scoping, then run the current lint and check commands to establish a baseline. Work through the suggested rollout in stages; done means the proposed type-aware and cleanup rules are configured with scoped exceptions, lint passes with no warnings, and CI uses the agreed check.
Written by the indexing model from the issue text.
Description
Context
Current setup: eslint.config.mjs uses js.configs.recommended + tseslint.configs.recommended (non-type-aware), and the lint script has no --fix. Several rules are disabled repo-wide with reasonable justifications, but the blanket-offs also discard checks that tsc does not cover (tsconfig already enforces strict, noUnusedLocals, noUnusedParameters, noImplicitReturns).
This issue tracks a low-risk, high-payoff ESLint hardening pass.
1. Enable the autofixer (no new rules, immediate QoL)
"lint": "eslint .",
"lint:fix": "eslint . --fix"
Plus project-level VSCode settings for fix-on-save:
{ "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" } }
2. Type-aware linting — biggest upgrade
Switch tseslint.configs.recommended → tseslint.configs.recommendedTypeChecked with parserOptions.project: './tsconfig.json'.
Rules that catch real bugs tsc cannot, especially for an async CLI writing vault files:
@typescript-eslint/no-floating-promises— un-awaited promise = silent write loss (top value)@typescript-eslint/no-misused-promises— async fn passed where sync expected@typescript-eslint/restrict-template-expressions— accidental[object Object]in CLI output@typescript-eslint/return-await,no-invalid-void-type,deterministic-star-results
Note: no-floating-promises will flag test/ code; scope it off for test/** (same pattern already used for no-explicit-any) rather than disabling repo-wide.
3. Re-enable blanket-disabled rules with surgical options
@typescript-eslint/no-unused-vars→['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrors: 'none' }](preserves the catch-binding/test-double exemption without losing dead-code checks)no-empty→['error', { allowEmptyCatch: true }](keeps the swallow-and-continue storage contract, catches emptyif/tryblocks elsewhere)prefer-const→ re-enable; graph-walk reassignment fixes are cheap (['error', { destructuring: 'all' }]also viable)
4. Zero-debate cleanups (all auto-fixable)
eqeqeq: ['error', 'always']@typescript-eslint/consistent-type-imports@typescript-eslint/no-useless-empty-exporteslint-plugin-unused-importsplugin (auto-deletes dead imports)
Suggested rollout order
- Add
--fixscript + fix-on-save (zero new violations) - Flip to
recommendedTypeChecked, fix theno-floating-promisesbatch (latent bugs, not style) - Re-enable
no-unused-vars/no-empty/prefer-constwith scoped options - Add cleanup rules +
--max-warnings=0in CI
Caveat: type-aware lint is slower (builds the TS program); keep it in the check script / CI, fine for dev at current repo size.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 23h 35m
- Merged PRs (30d)
- 159
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No 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 Kuldeep2822k/cli
-
core priority: medium tests
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Kuldeep2822k/cli#484 ·
Maintainers usually reply within 1 day
-
bug core priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Kuldeep2822k/cli#343 · 1 comment ·
Maintainers usually reply within 1 day
-
bug core priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Kuldeep2822k/cli#342 · 1 comment ·
Maintainers usually reply within 1 day
-
bug core priority: medium tests
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Kuldeep2822k/cli#304 · 1 comment ·
Maintainers usually reply within 1 day
-
bug core tests
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Kuldeep2822k/cli#514 ·
Maintainers usually reply within 1 day
All issues in Kuldeep2822k/cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endora-commerce/endora-commerce#397 ·
Maintainers usually reply within 1 day
-
level/task
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opennextjs/opennextjs-cloudflare#1461 ·
Maintainers usually reply within 1 day