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 has some incorrect warning #5899

Closed
alexsunxl opened this issue Apr 26, 2016 · 4 comments
Closed

jsx has some incorrect warning #5899

alexsunxl opened this issue Apr 26, 2016 · 4 comments

Comments

@alexsunxl
Copy link

Description

I use spacemacs write the reactjs and jsx
but there is a incorrect warning in some lines.
it seem like the photo

i shut down the js2-mode lint by using customize-group

 '(Js2-Highlight-External-variables nil)
 '(js2-include-jslint-globals nil)
 '(js2-instanceof-has-side-effects t)
 '(js2-mode-show-parse-errors nil)
 '(js2-strict-inconsistent-return-warning nil)
 '(js2-strict-missing-semi-warning nil)
 '(js2-strict-trailing-comma-warning nil)

but it is not working, so how can i fix it ?
and the second question is that jsx highlight is weak, how to enhance it ?

System Info

  • OS: darwin
  • Emacs: 24.5.1
  • Spacemacs: 0.105.19
  • Spacemacs branch: master (rev. 3274e7d)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((ranger :variables ranger-show-preview t)
 (colors :variables colors-enable-nyan-cat-progress-bar t)
 react javascript php auto-completion better-defaults emacs-lisp git
 (shell :variables shell-default-height 30 shell-default-position 'bottom)
 syntax-checking)
@axyz
Copy link
Contributor

axyz commented Apr 27, 2016

have a look at #5848 to only use eslint with react layer.

for the jsx highlight I've noticed huge differences among different themes. I'm using solarized-dark and it looks nice.

@alexsunxl
Copy link
Author

@axyz sigh...never thought that themes impact the highlight.
thanks. I have a try.

by the way , how about the warning ---- 'Code has no side effects', how to shut it down?

@jtmoulia
Copy link

whew found it @alexsunxl, this should shut them all down:

(setq js2-mode-show-strict-warnings nil)

@d12frosted
Copy link
Collaborator

Closing this issue for lack of activity. And looks like it's mostly answered. Let me know if you wish to resurrect it! 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Forum
  
To close
Development

No branches or pull requests

5 participants