|
|
In this article
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
Code settings
|
|
|
===========
|
|
|
|
|
|
File->Settings->Languages and Frameworks->JavaScript
|
|
|
- Select a ECMAScript 6
|
|
|
- Check "Only type based
|
|
|
|
|
|
File->Settings->Languages and Frameworks->Node.js and NPM
|
|
|
- Click `Enable` node.js core library
|
|
|
|
|
|
File->Settings->Languages and Frameworks->JavaScript -> Code Quality Tools -> ESLint
|
|
|
- Click `Enable`
|
|
|
|
|
|
Editor->Code Style->JavaScript
|
|
|
- Select `Standard` schema
|
|
|
|
|
|
|
|
|
JSON schema settings
|
|
|
=============
|
|
|
|
|
|
We provide a [JSON Schemas](http://json-schema.org/) in a `@unitybase/ub` package for a:
|
|
|
- server configuration: `node_modules\@unitybase\ub\public\schemas\ubConfig.schema.json`
|
|
|
- entity `meta` file: `node_modules\@unitybase\ub\public\schemas\entity.schema.json`
|
|
|
- scheduler configuration `node_modules\@unitybase\ub\public\schemas\scheduler.config.schema.json`
|
|
|
|
|
|
Go to JSON Schema configuration as described in [WebStorm JSON schema documentation](https://www.jetbrains.com/help/webstorm/2016.3/json-schema.html), and add a following rules:
|
|
|
|
|
|
| Schema File | Pattern |
|
|
|
|---------------|---------|
|
|
|
| ubConfig.schema | ubConfig*.json |
|
|
|
| entity.schema | *.meta |
|
|
|
| scheduler.config.schema | _schedulers.json |
|
|
|
|
|
|
Enjoy **autocomplete** and **validation** of config's and entity metafiles. |