admin管理员组文章数量:1292242
I am trying to get babel-eslint to work on Sublime 3. I have installed:
- eslint and babel-eslint globally on npm
- SublimeLinter package on Sublime
- SublimeLinter-contrib-eslint package on Sublime
Also, I have added:
"syntax_map": { ... "JavaScript (Babel)": "javascript" }
to my SublimeLinter.sublime-settings file.
When I run the linter with "parser": "espree"
on my .eslintrc file it works fine. But when I change the parser to babel-eslint it stops working.
I tried to follow the tutorial here: /@dan_abramov/lint-like-it-s-2015-6987d44c5b48 and I seem to be doing everything correctly.
Any ideas on what I'm doing wrong?
I am trying to get babel-eslint to work on Sublime 3. I have installed:
- eslint and babel-eslint globally on npm
- SublimeLinter package on Sublime
- SublimeLinter-contrib-eslint package on Sublime
Also, I have added:
"syntax_map": { ... "JavaScript (Babel)": "javascript" }
to my SublimeLinter.sublime-settings file.
When I run the linter with "parser": "espree"
on my .eslintrc file it works fine. But when I change the parser to babel-eslint it stops working.
I tried to follow the tutorial here: https://medium./@dan_abramov/lint-like-it-s-2015-6987d44c5b48 and I seem to be doing everything correctly.
Any ideas on what I'm doing wrong?
Share edited Aug 1, 2015 at 10:43 Leonid Beschastny 51.5k10 gold badges121 silver badges124 bronze badges asked Apr 25, 2015 at 12:25 RenRen 5311 gold badge6 silver badges15 bronze badges1 Answer
Reset to default 9Except what was in mentioned tutorial, what helped me was:
- upgrade global / local eslint to latest version
- install babel-eslint locally
- if you are using any eslint plugins, it appears they must be also installed locally (eslint-plugin-react in my case)
- as Dalgard mentioned you can also enable debug mode in Sublime eslint to find out what else can be wrong, i.e. inpatible versions or corrupted config.
I hope some of this will help.
本文标签: javascriptLinting not working when using babeleslint on Sublime Text 3Stack Overflow
版权声明:本文标题:javascript - Linting not working when using babel-eslint on Sublime Text 3 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741552075a2384940.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论