-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
react layer: better react file recognition #6952
Comments
You have to add regexps to Feel free to make a PR with additions. |
Note that the CAR instead of a regexp can be a predicate function. So all you need to do is write a function that detects a react file… |
Thanks for the explanation. I'll look into it. |
@TheBB do you know if magic-mode-alist only checks the first line? because I have some files that import react but there is some eslint code on top or many other things that are comments as the first line, but the first non comment file is react. So is there a way to make this a thing that counts only the first non-comment-like line? |
It checks if it matches the beginning of the buffer. Doesn't have to be the first line, but if so you need a multiline regexp. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Hi, react-layer recognizes react files only if you give them a correct suffix or prepend
/** @jsx React.DOM */
.It would be great if we could detect react files automagically like WebStorm does. Does anyone think that would be useful/possible? I'd be happy to help out.
The text was updated successfully, but these errors were encountered: