简体   繁体   中英

IntelliJ IDEA displaying JavaScript files with errors

在此处输入图片说明

I am new to IntelliJ Idea. When viewing .js files through the IDE it will display an issue with pink color in the header saying

JSCS: Cannot find 'jscs' script file under JSCS package directory.

I have tried to solve it by configuring JSCS settings but that import doesn't work. I think that occurred due to use strict keyword.

So how I can resolve that issue?

You have 2 options:

  1. Open File -> Settings and type jscs in the search box, then uncheck the enable checkbox. This will turn jscs off.
  2. Keep it enabled. Install jscs: 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). You also need to add a .jscsrc file in the root of your project, you can find a few presets here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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