[英]IntelliJ IDEA displaying JavaScript files with errors
I am new to IntelliJ Idea. 我是IntelliJ Idea的新手。 When viewing
.js
files through the IDE it will display an issue with pink color in the header saying 通过IDE查看
.js
文件时,标题中会显示一个粉红色的问题
JSCS: Cannot find 'jscs' script file under JSCS package directory.
JSCS:在JSCS软件包目录下找不到'jscs'脚本文件。
I have tried to solve it by configuring JSCS settings but that import doesn't work. 我试图通过配置JSCS设置来解决该问题,但是该导入无法正常工作。 I think that occurred due to
use strict
keyword. 我认为是由于
use strict
关键字而发生的。
So how I can resolve that issue? 那么我该如何解决这个问题呢?
You have 2 options: 您有2个选择:
npm i jscs -g
and then set JSCS Package to point to : C:\\Users\\<my_user>\\AppData\\Roaming\\npm\\node_modules\\jscs\\bin\\jscs
(on windows, not sure where is it installed on linux). npm i jscs -g
,然后将JSCS Package设置为指向: C:\\Users\\<my_user>\\AppData\\Roaming\\npm\\node_modules\\jscs\\bin\\jscs
(在Windows上,不确定在哪里安装) Linux版)。 You also need to add a .jscsrc file in the root of your project, you can find a few presets here
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.