ESLint

维基百科,自由的百科全书
跳转到导航 跳转到搜索
ESLint
File:ESLint logo.svg
原作者Nicholas C. Zakas
开发者Nicholas C. Zakas
首次发布2013年6月30日,​12年前​(2013-06-30
当前版本
    Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
    源代码库
    • {{URL|example.com|可选的显示文本}}
    Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
    编程语言JavaScript
    引擎
      Module:EditAtWikidata第29行Lua错误:attempt to index field 'wikibase' (a nil value)
      操作系统跨平台
      语言English
      类型静态程序分析
      许可协议MIT许可证
      网站eslint.org

      ESLint用于检查JavaScript代码是否符合规则,由Nicholas C. Zakas在2013年建立。[1][2]ESLint中的规则是可更改的,并且可以自行定义和加载规则。ESLint想要解决关于代码质量英语Coding conventions代码风格的问题。ESLint支持ECMAScript当前标准以及草案中用于未来标准的实验语法。使用JSXTypeScript的程序也可以透过外挂或转译器处理。[3][4]

      历史[编辑]

      JSLint和JSHint都缺乏为了代码质量和代码风格新增规则的能力。[2]在为JSHint做出贡献之后,Zakas决定在2013年6月建立一个新的整理工具ESLint(最初称为JSCheck,但在一个月后更名),其中所有规则都可更改,并且可以在运行时定义或加载其他规则。[5][6]

      2016年4月,ESLint项目加入了jQuery Foundation英语jQuery Foundation[7]随后,jQuery Foundation与Dojo Foundation合并,成为Linux Foundation其中的JS Foundation英语JS Foundation[8][9][10]

      2017年10月,ESLint从JS Foundation的mentorship program毕业。[11]

      2019年3月,JS Foundation和Node.js Foundation合并之后成为OpenJS Foundation的一部分。[12][13]

      支持[编辑]

      自2015年起,JetBrains于其WebStorm代码编辑器中内置支持ESLint,可对当前开启的文件运行ESLint,并在编辑器中有问题的代码附近显示警告。[14][15][16]

      2016年,Vue.js项目提供了一个ESLint外挂来自动验证Vue.js模板和其他功能的使用。[17][18][19]从2018年开始,Vue CLI建立新Vue.js项目时也会建议使用该外挂。[20]

      在2018年10月,React(由Facebook开发)发布了一个官方的ESLint外挂来帮助执行其编程规则。[21][22]

      截至2021年,ESLint是最常用的JavaScript linter,每周被下载超过14,000,000次。[23]

      参考资料[编辑]

      1. ^ First commit - eslint/eslint. GitHub. [2019-07-05]. (原始内容存档于2021-06-29) (English). 
      2. ^ 2.0 2.1 Zakas, Nicholas C. Introducing ESLint. nczonline.net. 16 July 2013 [2018-02-26]. (原始内容存档于2018-02-26) (en-US). JSLint was the state of the art in JavaScript linting technology 
      3. ^ The future of TypeScript on ESLint. ESLint - Pluggable JavaScript linter. [2020-04-24]. (原始内容存档于2021-04-13) (English). 
      4. ^ Accessibility auditing with eslint-plugin-jsx-a11y. web.dev. Google Developers. 2019-04-29 [2020-04-24]. (原始内容存档于2021-02-01) (English). The [ELint plugin] can help pinpoint [issues] in your JSX. 
      5. ^ Understanding the Real Advantages of Using ESLint. Rangle.io Blog. 2015-03-26 [2018-02-26]. (原始内容存档于2019-02-09). 
      6. ^ Rename project to ESLint · eslint/eslint@4f4c351. GitHub. 4 July 2013 [2020-06-26]. (原始内容存档于2021-12-23) (English). 
      7. ^ Zakas, Nicholas. ESLint Joins The jQuery Foundation. eslint.org. 19 April 2016 [2019-07-05]. (原始内容存档于2021-01-27) (English). 
      8. ^ jQuery Foundation and Dojo Foundation to Merge. Official jQuery Blog. 1 September 2015 [2018-07-02]. (原始内容存档于2021-02-09) (en-US). 
      9. ^ jQuery Foundation and Dojo Foundation to Merge. PRWeb. 1 July 2015 [2018-07-02]. (原始内容存档于2020-11-08). 
      10. ^ Announcing the JS Foundation!. SitePen. 2016-10-17 [2018-07-02]. (原始内容存档于2020-09-25) (en-US). 
      11. ^ ESLint Graduates from JS Foundation Mentorship Program. JS Foundation Blog. 2017-10-05 [2019-07-05]. (原始内容存档于2019-07-05) (en-US). 
      12. ^ Singh, Manish. Node.js and JS foundations are merging to form OpenJS. VentureBeat. 2019-03-12 [2019-03-21]. (原始内容存档于2021-02-11). 
      13. ^ The Node.js Foundation and JS Foundation Announce an Intent to Merge. JS Foundation Blog. 2018-10-04 [2019-07-05]. (原始内容存档于2019-07-05) (en-US). How will this impact the technical direction of … ESLint This will not change the technical independence for projects like ESLint. 
      14. ^ WebStorm Linting, refactoring and compiling. WebStorm Blog. JetBrains. 30 December 2015 [2019-07-05]. (原始内容存档于2021-02-25) (en-US). 
      15. ^ Using JavaScript Standard Style. WebStorm Blog. JetBrains. 7 April 2017 [2019-07-05]. (原始内容存档于2021-01-28) (en-US). 
      16. ^ ESLint - WebStorm Manual. JetBrains. [2019-07-05]. (原始内容存档于2020-11-11). 
      17. ^ Writing Vue.js Applications in TypeScript. Telstra Kloud. [2019-07-05]. (原始内容存档于2020-04-01). 
      18. ^ Lesson: Automatic Linting with ESLint - The Vue.js Master Class. Vue School. [2019-07-05]. (原始内容存档于2021-02-04) (English). 
      19. ^ Introduction | eslint-plugin-vue. eslint.vuejs.org. [2019-07-05]. (原始内容存档于2021-02-25). 
      20. ^ The Vue Handbook: a thorough introduction to Vue.js. Developer News. 2018-07-05 [2019-07-05]. (原始内容存档于2021-01-21) (English). Use the interactive CLI to create a new Vue project [..] By default, there is [..] ESLint integration 
      21. ^ ESLint Plugin – Rules of Hooks – React Manual. reactjs.org. [2019-07-05]. (原始内容存档于2021-06-06) (English). 
      22. ^ Markbåge, Sebastian. Implement the Hooks proposal · facebook/react. GitHub. 25 October 2018 [2019-07-05]. (原始内容存档于2020-11-12) (English). 
      23. ^ jslint vs jshint vs eslint vs tslint vs @typescript eslint/eslint plugin. www.npmtrends.com. [2021-01-26]. (原始内容存档于2021-02-02) (English). 

      外部链接[编辑]