... | @@ -4,6 +4,14 @@ In this article |
... | @@ -4,6 +4,14 @@ In this article |
|
|
|
|
|
Code settings
|
|
Code settings
|
|
===========
|
|
===========
|
|
|
|
In this project we use a ](https://github.com/standard/standard)
|
|
|
|
|
|
|
|
Install [standard] globally:
|
|
|
|
```
|
|
|
|
npm i -g standard
|
|
|
|
```
|
|
|
|
|
|
|
|
In the WebStorm IDE:
|
|
|
|
|
|
File->Settings->Languages and Frameworks->JavaScript
|
|
File->Settings->Languages and Frameworks->JavaScript
|
|
- Select a ECMAScript 6
|
|
- Select a ECMAScript 6
|
... | @@ -14,10 +22,10 @@ File->Settings->Languages and Frameworks->Node.js and NPM |
... | @@ -14,10 +22,10 @@ File->Settings->Languages and Frameworks->Node.js and NPM |
|
|
|
|
|
File->Settings->Languages and Frameworks->JavaScript -> Code Quality Tools -> ESLint
|
|
File->Settings->Languages and Frameworks->JavaScript -> Code Quality Tools -> ESLint
|
|
- Click `Enable`
|
|
- Click `Enable`
|
|
|
|
- For **WebStorm >= 2017.3** in the combo `ESLint package` select `~\AppData\Roaming\npm\node_modules\standard`
|
|
|
|
|
|
Editor->Code Style->JavaScript
|
|
For other WebStorm versions:
|
|
- **WebStorm >= 2017.3** click blue label __Set from..__ and select Predefined Style – Standard and the style will replace your current scheme
|
|
- **WebStorm 2017.1** - go to Editor->Code Style->JavaScript and select `Standard` schema
|
|
- **WebStorm 2017.1** - select `Standard` schema
|
|
|
|
- **WebStorm < 2017.1** - see [manual configuration instruction](https://github.com/feross/standard/blob/master/docs/webstorm.md)
|
|
- **WebStorm < 2017.1** - see [manual configuration instruction](https://github.com/feross/standard/blob/master/docs/webstorm.md)
|
|
|
|
|
|
Editor->File Types
|
|
Editor->File Types
|
... | | ... | |