Pseudo-function argument validation inconsistencies causing null crashes or misleading errors
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 634
- Forks
- 77
- Avg merge
- 1m
- Merged PRs (30d)
- 19
Description
Some pseudo-classes behave inconsistently when required arguments are missing.
Examples:
:langthrowsCannot read properties of null (reading 'split'):icontainsthrowsCannot read properties of null (reading 'toLowerCase'):nth-childthrowsCannot read properties of null (reading 'match'):has/:notwithout arguments can reportUnknown pseudo-classinstead of a clear arity error
Expected:
- Invalid selectors should fail with consistent selector-validation errors (for example, "requires an argument"), not internal null/property errors or misleading unknown-pseudo errors.
This seems to come from uneven argument validation across pseudo execution paths.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reproducing the missing-argument cases for :lang, :icontains, :nth-child, :has, and :not, then trace their pseudo execution and argument-validation paths. Done means invalid selectors consistently produce clear selector-validation or arity errors instead of null/property crashes or misleading unknown-pseudo errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100