ruanyl / vim-fixmyjs

vim fixmyjs - auto fix your javascript using fixmyjs/eslint/tslint/jscs
MIT License
69 stars 11 forks source link

not work with eslint js configure of .eslintrc.js #12

Closed JacobWay closed 7 years ago

JacobWay commented 7 years ago

Prompt an error not find the eslintrc file.

ruanyl commented 7 years ago

Any errors? Is eslint executable ? Where did you put `.eslintrc?

ruanyl commented 7 years ago

@JacobWay the way how vim-fixmyjs looks for eslintrc is like this:

first, it will search your project root dir, which is where your .git file located. if it doesn't find it in project root dir, it will try to search from your $HOME dir, then your .vim dir.

So if you don't have .eslintrc file in these paths, you have to give it a value by:

let g:fixmyjs_rc_path = 'path/to/.rc'
JacobWay commented 7 years ago

@ruanyl The problem is resolved according to your reply that I add the line let g:fixmyjs_rc_path = '.eslintrc.js' in the .vimrc.

The previous problem is that I used .js extension file of .eslint.js as the eslint configure. I should read your document first.

Thanks for your help.