Closed natealcedo closed 7 years ago
@ndaljr Thanks for the suggestion :) To make it simple(bacause it requires one specific config file supplied to eslint
when running under command line), I think we could give g:fixmyjs_rc_filename
a list, for example: [".eslintrc.json", ".eslintrc.js"]
. Then we could take the first filename appears in the list which exists in current working directory.
@ruanyl I actually forgot that .yaml is also accepted as a config file format. Anyways I think that your suggestions is great. On my end do I have to do anything to achieve this behaviour? I'm not exactly familiar with vim script.
@ndaljr I will have to update vim-fixmyjs
so that g:fixmyjs_rc_filename
accepts a list. Currently it only expects a string. I will add it soon.
Alright! I'll close the issue when the update has been patched! Thanks for the great work you've been doing. The community appreciates it. :)
Hey @ruanyl, do you want help on this? It doesn't seem too hard. You probably can do it in five minutes, but let me know if you'd prefer someone else to do it. I can send you a PR today or tomorrow.
@fvictorio PR is welcome 👍
Hi sorry if this is opening an old issue. Is there any update to this? I mean its not really a bother anymore to me. Shall I close this instead? I've gotten used to just renaming my rc files.
@ndaljr Hi, there is a PR for this: https://github.com/ruanyl/vim-fixmyjs/pull/16 , but it might have potential issues, maybe let's keep this open until it's solved because I do think this is a quite common requirement :)
Oh, sorry! I completely forgot about this. I'll try to improve the PR with @ruanyl suggestions ASAP.
@ndaljr Hi, with the help of @fvictorio , this plugin is able to accept different config files now 🎉 , checkout README for details!
Thanks @fvictorio and @ruanyl! Great work! Your efforts are much appreciated
Currently there isn't a standard config file format for eslint. You can either use .eslintrc.js or .eslintrc.json. Is there a way to allow for the use of both? Currently my work flow is to init an eslint config and rename the file that eslint gives from ".eslintrc.json/.eslintrc.js" into ".eslintrc". Either that or make a soft link of ".eslintrc.json/.eslintrc.js" to ".eslintrc". Would doing something like this be viable? I'm not sure if vim recognizes this. What do you think?
let g:fixmyjs_rc_filename = '.eslintrc.*'