Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] jsx-no-target-blank: Add warnOnSpreadAttributes option #2855

Merged
merged 1 commit into from Dec 23, 2020
Merged

[New] jsx-no-target-blank: Add warnOnSpreadAttributes option #2855

merged 1 commit into from Dec 23, 2020

Commits on Oct 31, 2020

  1. [New] jsx-no-target-blank: Add warnOnSpreadAttributes option

    Defaults to `false`. When set to `true`, treats spread attributes as dangerous unless explicitly overriden.
    
    e.g. the following is safe:
    
    <a {...dangerousObject} rel="noreferrer" target="_blank"></a>
    
    This change also extends target="_blank" detection to include conditional expressions whose alternate or consequent is the "_blank" string (case-insensitive).
    
    Fixes #2827
    michael-yx-wu authored and ljharb committed Oct 31, 2020
    Copy the full SHA
    c4ecce9 View commit details
    Browse the repository at this point in the history