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

Jsx max props per line updates #882

Merged
merged 4 commits into from
Feb 15, 2017

Commits on Jan 29, 2017

  1. jsx-max-props-per-line: Fix when prop spans multiple lines

    In this patch we now consider props to be on the same "line" if the line
    of where one prop ends matches the line of where the next prop begins.
    
    e.g.
    ```
    <App foo={{
    }} bar />
    ```
    
    `foo` and `bar` are now considered to be on the same line. Previously,
    we would only look at the line in which the prop begins.
    kentor committed Jan 29, 2017
    Configuration menu
    Copy the full SHA
    bd20a79 View commit details
    Browse the repository at this point in the history
  2. jsx-max-props-per-line: Add when option

    If `when` is set to `multiline`, then this rule skips checking entirely
    if the jsx opening tag is a single line.
    
    Defaults `when` to `always` which is the current behavior.
    kentor committed Jan 29, 2017
    Configuration menu
    Copy the full SHA
    b485e28 View commit details
    Browse the repository at this point in the history
  3. jsx-max-props-per-line: Add additional test cases

    Make sure it works when a prop is on the same line as the start line of
    the tag, as well as with spread props that spans multiple lines.
    kentor committed Jan 29, 2017
    Configuration menu
    Copy the full SHA
    b52f3b8 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2017

  1. jsx-max-props-per-line: Use json format in docs

    To be consistent with the "Rule Options" section and other docs
    kentor committed Jan 30, 2017
    Configuration menu
    Copy the full SHA
    a84d5f5 View commit details
    Browse the repository at this point in the history