jquery / jquery/sizzle

Syntax error unclear

Open
#326 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Has a jQuery counterpart
Dominant language
JavaScript
Stars
6.3k
Forks
927
PR merge metrics
No merged PRs in 30d

Description

We ran some front-end tests and saw the error:

Syntax error, unrecognized expression: #

We dug for a while looking for a stray # in our code before searching the internet deep enough to realize this was an invalid jQuery selector.

This error message would be more clear if it mentioned "sizzle", "jQuery", "selector", or another string that would make it clear to the user that this is not a JavaScript syntax error, but a sizzle selector expression syntax error.

Contributor guide

Open the contributing guide

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 reported error with the invalid jQuery selector "#" through the front-end tests, then inspect the Sizzle selector-expression error path. Done means the message identifies the problem as a Sizzle/jQuery selector syntax error rather than a JavaScript syntax error, with coverage for the revised wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.