-
-
Notifications
You must be signed in to change notification settings - Fork 239
React 16.2 fragment syntax triggers #554
Comments
Any updates on this? I'm using the following versions: |
As a workaround, you can use |
+1 |
Of course we can use I have checked the instructions here:
also this for reference: eslint/eslint#9662 (still has blocked label) |
Maybe you can use a workaround like, create a component named "f" and make it import fragment from react and pass down its prop children. This way you can use not sure if this will work |
Maybe you can use a workaround like, create a component named "f" and make it import fragment from react and pass down its prop children. This way you can use |
Or you can just import fragment under the same "f" and alias 😂 |
Note: Fragment is only working for |
@fabiomcosta nope that still triggers the quotes rule |
"babel-eslint": "^8.2.2",
"eslint": "^4.19.1" The latest ones still have quotes error. |
Just an update, this issue isn't with Until it get updated in ESLint proper (can track via the linked thread above), I've added a new |
Published with https://github.com/babel/eslint-plugin-babel/releases/tag/v5.0.0 It has a peerDep on ESLint 4. Thanks all! FYI still looking for contributors on this repo and eslint-plugin-babel. I'm happy to help mentor or get people involved. Or as always can also help out out team on the Open Collective |
I'm using that versions above, but still showing the error: |
@brneto that is a different error, can you create another issue with your config/code? better yet, a small repo that reproduces the problem? |
Forget it, I fixed the problem! It had nothing to do with babel-eslint. It had to do with babel itself. I was using babel v6. When I've updated to v7 plus others configurations, worked! Anyway thanks for the help! |
Still getting the
Finding it very difficult to debug why. |
I think you meant Babel v7 beta? It's a |
any update? |
not reproduced with:
|
the package that comes with Create React App, |
Issue is still present for me.
@existentialism I don't think this is the case anymore since ESLint 5 released but I'm not 100% sure. Seems like it from this discussion eslint/eslint#9662 Update: Jumped the gun. Turns out |
Reacr 16.2 introduced fragments. This feature is accompanied by a syntactic sugar. The following component is now valid in React:
When using the default ESLint parser, this causes a syntax error.
When using the
babel-eslint
parser, this triggers the quotes rule.The text was updated successfully, but these errors were encountered: