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

Still getting 'unclosed regular expression' #5

Open
fellz opened this issue Feb 23, 2015 · 11 comments
Open

Still getting 'unclosed regular expression' #5

fellz opened this issue Feb 23, 2015 · 11 comments

Comments

@fellz
Copy link

fellz commented Feb 23, 2015

Installed wrapper and still getting error.
Btw article is missing also - 404 on github

@jaxbot
Copy link
Owner

jaxbot commented Feb 23, 2015

Fixed the link, apologies. Was a relative URL instead of the absolute.

Did you add the configuration for Syntastic to your vimrc and reload? You have to make sure it uses jsxhint and the custom wrapper executable instead of jshint or any of the others.

@jaxbot
Copy link
Owner

jaxbot commented Mar 3, 2015

Any updates?

@fellz
Copy link
Author

fellz commented Mar 4, 2015

Hi, sorry for delay
here is what i have in .vimrc
set runtimepath+=~/.vim/bundle/jshint2.vim/

@jaxbot
Copy link
Owner

jaxbot commented Mar 4, 2015

You need to add these lines from the readme to your vimrc:

let g:syntastic_javascript_checkers = ['jsxhint']
let g:syntastic_javascript_jsxhint_exec = 'jsx-jshint-wrapper'

@fellz
Copy link
Author

fellz commented Mar 4, 2015

oh it was wrong config
let g:syntastic_javascript_checkers = ['jsxhint']
let g:syntastic_javascript_jsxhint_exec = 'jsx-jshint-wrapper'
this is exactly as yours

@jaxbot
Copy link
Owner

jaxbot commented Mar 5, 2015

Alright, in that case I'm going to need some more debug info.

Does running jsx-jshint-wrapper in your shell work? What about !jsx-jshint-wrapper in Vim? What version of Vim are you using? What filetype is the file you are editing? Javascript or JSX or something else?

If you're getting the unenclosed syntax message, the override to set syntastic_javascript_checkers isn't working correctly and is instead running something else.

Do you have the latest version of Syntastic installed?

@fellz
Copy link
Author

fellz commented Mar 5, 2015

!jsx-jshint-wrapper is working in vim, so i see no errors when i enter this in vim

Vim version 7.4.52
Syntastic latest version i guess, i installed it couple days ago
File i'm editing - app.js

Here is an error

    var routes = (
      <Route handler={App} path="/">
      error<DefaultRoute handler={Articles} />                                 
     <Route name="user" handler={User} />
     <NotFoundRoute handler={NotFound} />
    </Route>
    )

I use js beautify maybe this is a problem

Plugin 'gmarik/Vundle.vim'
"Plugin 'nsf/gocode', {'rtp': 'vim/'}
Plugin 'fatih/vim-go'
Plugin 'Valloric/YouCompleteMe'
Plugin 'maksimr/vim-jsbeautify'
Plugin 'einars/js-beautify'

@jaxbot jaxbot changed the title Doesn't work - still 'unclosed regular expression' Still getting 'unclosed regular expression' Mar 6, 2015
@jaxbot
Copy link
Owner

jaxbot commented Mar 6, 2015

Just tried it on a vanilla box and wasn't able to reproduce this. Only error I get with your code is missing semicolon.

Do you have react-tools and jshint both installed?

What is the output of running:

echo g:syntastic_javascript_checkers = ['jsxhint']
echo g:syntastic_javascript_jsxhint_exec = 'jsx-jshint-wrapper'

in Vim?

@fellz
Copy link
Author

fellz commented Mar 6, 2015

i put these lines to vimrc and then run vim
E15: Invalid expression: = ['jsxhint']
E15: Invalid expression: = 'jsx-jshint-wrapper'
here is what i got

the same thing if i use
: echo g:syntastic_javascript_checkers = ['jsxhint']

@jaxbot
Copy link
Owner

jaxbot commented Mar 7, 2015

Err, I meant:

echo g:syntastic_javascript_checkers
echo g:syntastic_javascript_jsxhint_exec

And what about the other question, are the react-tools and jshint installed?

@fellz
Copy link
Author

fellz commented Mar 7, 2015

of course i installed
all is fine i guess
$ vim
['jsxhint']
jsx-jshint-wrapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants