0

enter image description here

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?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
A.Wen
  • 223
  • 1
  • 5
  • 23

1 Answers1

1

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
Tomer
  • 17,787
  • 15
  • 78
  • 137
  • I used your above mentioned first option. Thanks it works. Now JSCS issue has gone. But "jshint: use the function form of "use strict" (w097)" issue is there – A.Wen Sep 24 '17 at 09:19