Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #4141
Closed
Open
Issue created Mar 11, 2018 by Administrator@rootContributor

Lint rules don't allow links with javascript:void href, or any alternative.

Created by: peterbraden

For a variety of valid reasons, you may want to have html anchors with a href that is null for a time. One way of doing this is href='javascript:void(0)', however this triggers: Script URL is a form of eval no-script-url" lint error.

Another way is href='#'. This triggers: Links must not point to "#". Use a more descriptive href or use a button instead jsx-a11y/href-no-hash

Another way is <a href>, This triggers: Warning: Received 'true' for a non-boolean attribute 'href'.

Are there ways to achieve the desired effect without lint errors, otherwise can one of these be removed?

See: #808 (closed)

Assignee
Assign to
Time tracking