jscs package directory is not specified

唯见长江天际流
  • 683

webstorm 打开 github上的项目,报这个提示,什么意思?

回复
阅读 1.7k
1 个回答
止醉
  • 770

JSCS自己看吧

To install JSCS globally
Open the built-in WebStorm Terminal (press Alt+F12 or choose View | Tool Windows | Terminal on the main menu)
Type npm install jscs -g at the command prompt.
To activate and configure JSCS
Open the JSCS page (File | Settings | Languages and Frameworks | JavaScript | Code Quality Tools | JSCS for Windows and Linux or WebStorm | Preferences | Languages and Frameworks | JavaScript | Code Quality Tools | JSCS for macOS).
Select the Enable check box. After that the controls on the page become available.
In the Node Interpreter field, specify the Node.js interpreter to use. Choose one of the configured interpreters or click browseButton.png and configure a new one as described in Configuring Node.js Interpreters.
In the JSCS Package field, specify the location of the jscs package installed in the current project, see Installing JSCS.
Appoint the configuration to use.
By default, WebStorm first looks for a jscsConfig property in the package.json file of the current project. If no such property is found, WebStorm looks for a .jscsrc or a .jscs.json configuration file. WebStorm starts the search from the folder where the file to be checked is stored, then searches in the parent folder, and so on until reaches the project root. Accordingly, you have to define the configuration to apply either as a jscsConfig property in the package.json file or in a .jscsrc or a .jscs.json configuration file, or in a custom JSON configuration file.

You can also apply a predefined set of rules, either independently or in combination with a configuration file. In the latter case, the rules from the configuration file override the predefined rules.

To have WebStorm look for a jscsConfig property in the package.json file or for a .jscsrc or a .jscs.json file, choose the Search for config(s) option.
To use a custom file, choose the Configuration File option and specify the location fo the file in the Path field. Choose the path from the drop-down list, or type it manually, or click the /help/img/idea/2017.2/browseButton.png button and select the relevant file from the dialog box that opens.
To have a predefined set or rules applied, choose the desired set from the Code Style Preset drop-down list.
If necessary, from the Code Style Preset drop-down list, choose the set of predefined rules associated with the code style you use.

宣传栏