简体   繁体   English

如何将ESLint检查添加到WebStorm和计数行

[英]How to add ESLint check to WebStorm and count lines

  1. How can I add to WebStorm ESLint with some default configuration for Node.js project? 如何使用Node.js项目的某些默认配置添加到WebStorm ESLint?
  2. In addition, how can I count my project lines without the nodeModules folder? 另外,如果没有nodeModules文件夹,如何计算项目行数?

I using WebStorm version 10.0.4 我使用的是WebStorm版本10.0.4

You need to install ESLint via npm either locally in your project or globally, then go to WebStorm Preferences - Languages & Frameworks - JavaScript - Code quality tools - ESLint and Enable it. 您需要通过npm在您的项目中本地或全局安装ESLint,然后转到WebStorm首选项-语言和框架-JavaScript-代码质量工具-ESLint并启用它。 You would also need to add an ESLint config file (eg .eslintrc) to your project. 您还需要向项目添加ESLint配置文件(例如.eslintrc)。 WebStorm doesn't provide any built-in functionality to count the lines in your project. WebStorm不提供任何内置功能来计算项目中的行数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM