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

Fix JSX - Conditional expression #1499

Closed
danielspk opened this issue Mar 16, 2020 · 3 comments
Closed

Fix JSX - Conditional expression #1499

danielspk opened this issue Mar 16, 2020 · 3 comments

Comments

@danielspk
Copy link

What version of this package are you using?
14.3.3

What operating system, Node.js, and npm version?
Node 12.15.0 - NPM 6.13.4

What happened?
standard --fix not fix some problem:

Root.js:46:7: Expected indentation of 4 space characters but found 6

const PrivateRoute = ({ component: Component, ...rest }) => (
  <Route
    {...rest}
    render={props =>
      !isAuth() ? (
        <Redirect to={{ pathname: '/', state: { from: props.location } }} />
      ) : (
        <Component {...props} />
      )} {/* line 46 */}
  />
)

If I change the indentation to 4 spaces, I get the following error:

Root.js:46:1: Expected indentation of 6 spaces but found 4

The error is cyclical.

@feross
Copy link
Member

feross commented Oct 29, 2020

Thanks for the issue. This is fixed in standard 15.0.1

@feross feross closed this as completed Oct 29, 2020
@feross
Copy link
Member

feross commented Oct 29, 2020

Scratch that – this is yet another case that we missed. Will fix it in standard v16!

@feross
Copy link
Member

feross commented Oct 29, 2020

This will be in the standard 16 release

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

2 participants