fb55 / fb55/css-select

Pseudo-function argument validation inconsistencies causing null crashes or misleading errors

Open
#1,766 1 comment 0 reactions 0 assignees View on GitHub

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:

  • :lang throws Cannot read properties of null (reading 'split')
  • :icontains throws Cannot read properties of null (reading 'toLowerCase')
  • :nth-child throws Cannot read properties of null (reading 'match')
  • :has / :not without arguments can report Unknown pseudo-class instead 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

  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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.