Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

cleaner: add a rule against the void operator

Open Beginner friendly
#16 2 comments 0 reactions 1 assignee View on GitHub

@AnushreeKasturi is already working on this.

Since Oct 11, 2026.

  • #38 by @AnushreeKasturi — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start in scripts/cleaner.mjs at the RULES array and copy the shape of the no-types-in-components entry (id, description, fix, appliesTo, check). In check, use ts.isVoidExpression(node) to find the void operator, and restrict appliesTo to .ts and .tsx files under src/renderer/src. Add a describe block in tests/cleaner.test.ts covering a flagged void load() and an unflagged (): void return type. Done when pnpm test passes, pnpm cleaner still reports nothing on the current code, and the CONTRIBUTING.md list of checks names the new rule.

Written by the indexing model from the issue text.

Description

chore good first issue

pnpm cleaner checks the conventions in CONTRIBUTING.md that Prettier and TypeScript don't. It has one rule so far, and new ones get added one at a time. This issue adds the next: don't use the void operator (from the Code style section).

void load()               // ✖ flagged
load()                    // ✔
const f = (): void => {}  // ✔ the void *type* is fine

The renderer already follows this, so the new rule should pass on the current code.

Where to look
  • scripts/cleaner.mjs: RULES. Copy the shape of no-types-in-components: an id, a one-line description, a fix, appliesTo and check
  • ts.isVoidExpression(node) finds the operator. The void type is a different node, so it won't be flagged
  • appliesTo gets every file under src/renderer/src, including .css and .html, so limit it to .ts and .tsx
  • tests/cleaner.test.ts: add a describe for the rule next to the existing one
Done when
  • void something() anywhere in a renderer .ts/.tsx file is reported with its line and column
  • The void type in annotations isn't
  • pnpm cleaner still reports no problems on the current code, and pnpm test passes
  • The line in CONTRIBUTING.md that lists what pnpm cleaner checks mentions the new rule

Suggested pull request title: chore(cleaner): flag the void operator

New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.


Generated by Claude Code

Dominant language
TypeScript
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alexsilver8/openpaste

All issues in alexsilver8/openpaste

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.