最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to enable jslint plugin in Notepad++ to recognize es6 features like "=>" - Stack Overf

programmeradmin1浏览0评论

Is it possible to enable ES6 features in the jslint plugin for Notepad++?

I tried setting the option es6 and ES6 to true but that doesn't seem to work.

Specifically I'm using the arrow functions "=>" and getting jslint errors saying expected an identifier and saw ">".

This is for programs running under node.js v 4.2.1 using notepad++ as the editor in a Windows 2012 R2 environment.

Is it possible to enable ES6 features in the jslint plugin for Notepad++?

I tried setting the option es6 and ES6 to true but that doesn't seem to work.

Specifically I'm using the arrow functions "=>" and getting jslint errors saying expected an identifier and saw ">".

This is for programs running under node.js v 4.2.1 using notepad++ as the editor in a Windows 2012 R2 environment.

Share Improve this question edited Oct 22, 2015 at 20:12 ciso asked Oct 22, 2015 at 17:04 cisociso 3,0507 gold badges37 silver badges64 bronze badges 5
  • Can you replace a jslint.js file anywhere in Notepad++? – ruffin Commented Oct 22, 2015 at 18:59
  • I couldn't find one to replace. The plugin is in a JSLintNpp.dll library file downloaded from sourceforge/projects/jslintnpp – ciso Commented Oct 22, 2015 at 20:00
  • I don't really think JSLint supports es6. You'll need to use something like ESLint. – user1726343 Commented Oct 22, 2015 at 20:19
  • @Asad Saeeduddin According to github./douglascrockford/JSLint/blob/master/jslint.html it does: " <div><label><input title=es6 type=checkbox>ES6</label></div>" Either I don't know how to enable it in notepad++ or it hasn't been implemted there. Wonderring if anyone else has been able to use jslint in notepad++ for es6. Also here: jslint. – ciso Commented Oct 22, 2015 at 21:58
  • @AsadSaeeduddin In the latest version (check jslint.) it does. Been out a couple of months. Will have to check notepad++ next time I'm in front of a Windows box. – ruffin Commented Oct 23, 2015 at 5:09
Add a ment  | 

2 Answers 2

Reset to default 2

Found the answer. Add

/*jslint es6:true*/ 

at the beginning of the program and get the latest jslint plugin for notepad++ at http://sourceforge/projects/jslintnpp/

Add at the beginning of your code:

/*jslint esnext:true*/
发布评论

评论列表(0)

  1. 暂无评论