2017-09-06 14:21:26 +00:00
|
|
|
===============================================================================
|
|
|
|
ALE JSON Integration *ale-json-options*
|
|
|
|
|
|
|
|
|
2021-11-18 22:41:05 +00:00
|
|
|
===============================================================================
|
|
|
|
cspell *ale-json-cspell*
|
|
|
|
|
|
|
|
See |ale-cspell-options|
|
|
|
|
|
|
|
|
|
2021-08-21 01:02:56 +00:00
|
|
|
===============================================================================
|
|
|
|
eslint *ale-json-eslint*
|
|
|
|
|
|
|
|
The `eslint` linter for JSON uses the JavaScript options for `eslint`; see:
|
|
|
|
|ale-javascript-eslint|.
|
|
|
|
|
|
|
|
You will need a JSON ESLint plugin installed for this to work.
|
|
|
|
|
|
|
|
|
2018-01-24 10:36:02 +00:00
|
|
|
===============================================================================
|
|
|
|
fixjson *ale-json-fixjson*
|
|
|
|
|
|
|
|
fixjson is a JSON file fixer/formatter for humans using (relaxed) JSON5.
|
|
|
|
It provides:
|
|
|
|
|
|
|
|
- Pretty-prints JSON input
|
|
|
|
- Fixes various failures while humans writing JSON
|
|
|
|
- Fixes trailing commas objects or arrays
|
|
|
|
- Fixes missing commas for elements of objects or arrays
|
|
|
|
- Adds quotes to keys in objects
|
|
|
|
- Newlines in strings
|
|
|
|
- Hex numbers
|
|
|
|
- Fixes single quotes to double quotes
|
|
|
|
|
|
|
|
You can install it using npm:
|
|
|
|
>
|
|
|
|
$ npm install -g fixjson
|
|
|
|
<
|
|
|
|
ALE provides fixjson integration as a fixer. See |ale-fix|.
|
|
|
|
|
|
|
|
g:ale_json_fixjson_executable *g:ale_json_fixjson_executable*
|
|
|
|
*b:ale_json_fixjson_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'fixjson'`
|
|
|
|
|
|
|
|
The executable that will be run for fixjson.
|
|
|
|
|
|
|
|
g:ale_json_fixjson_options *g:ale_json_fixjson_options*
|
|
|
|
*b:ale_json_fixjson_options*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can add extra options to the command executed for running
|
|
|
|
fixjson.
|
|
|
|
|
2018-01-24 18:45:07 +00:00
|
|
|
g:ale_json_fixjson_use_global *g:ale_json_fixjson_use_global*
|
|
|
|
*b:ale_json_fixjson_use_global*
|
|
|
|
|
|
|
|
Type: |Number|
|
2018-04-09 18:11:20 +00:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-01-24 18:45:07 +00:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-01-24 10:36:02 +00:00
|
|
|
|
2017-09-06 14:21:26 +00:00
|
|
|
===============================================================================
|
|
|
|
jsonlint *ale-json-jsonlint*
|
|
|
|
|
2019-03-15 21:21:48 +00:00
|
|
|
g:ale_json_jsonlint_executable *g:ale_json_jsonlint_executable*
|
|
|
|
*b:ale_json_jsonlint_executable*
|
|
|
|
|
|
|
|
Type: |String|
|
|
|
|
Default: `'jsonlint'`
|
|
|
|
|
|
|
|
The executable that will be run for jsonlint.
|
|
|
|
|
|
|
|
g:ale_json_jsonlint_use_global *g:ale_json_jsonlint_use_global*
|
|
|
|
*b:ale_json_jsonlint_use_global*
|
|
|
|
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
2017-09-06 14:21:26 +00:00
|
|
|
|
|
|
|
|
2018-01-24 10:12:29 +00:00
|
|
|
===============================================================================
|
|
|
|
jq *ale-json-jq*
|
|
|
|
|
|
|
|
g:ale_json_jq_executable *g:ale_json_jq_executable*
|
|
|
|
*b:ale_json_jq_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'jq'`
|
|
|
|
|
2018-01-28 11:51:20 +00:00
|
|
|
This option can be changed to change the path for `jq`.
|
2018-01-24 10:12:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_json_jq_options *g:ale_json_jq_options*
|
|
|
|
*b:ale_json_jq_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This option can be changed to pass extra options to `jq`.
|
|
|
|
|
2018-10-12 08:15:32 +00:00
|
|
|
g:ale_json_jq_filters *g:ale_json_jq_filters*
|
|
|
|
*b:ale_json_jq_filters*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'.'`
|
|
|
|
|
|
|
|
This option can be changed to pass custom filters to `jq`.
|
|
|
|
|
2018-01-24 10:12:29 +00:00
|
|
|
|
2017-09-06 14:21:26 +00:00
|
|
|
===============================================================================
|
|
|
|
prettier *ale-json-prettier*
|
|
|
|
|
|
|
|
See |ale-javascript-prettier| for information about the available options.
|
|
|
|
|
|
|
|
|
2021-01-06 04:25:52 +00:00
|
|
|
===============================================================================
|
|
|
|
spectral *ale-json-spectral*
|
|
|
|
|
|
|
|
Website: https://github.com/stoplightio/spectral
|
|
|
|
|
|
|
|
Installation
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Install spectral either globally or locally: >
|
|
|
|
|
|
|
|
npm install @stoplight/spectral -g # global
|
|
|
|
npm install @stoplight/spectral # local
|
|
|
|
<
|
|
|
|
|
|
|
|
Options
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
g:ale_json_spectral_executable *g:ale_json_spectral_executable*
|
|
|
|
*b:ale_json_spectral_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'spectral'`
|
|
|
|
|
|
|
|
This variable can be set to change the path to spectral.
|
|
|
|
|
|
|
|
g:ale_json_spectral_use_global *g:ale_json_spectral_use_global*
|
|
|
|
*b:ale_json_spectral_use_global*
|
|
|
|
Type: |String|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2017-09-06 14:21:26 +00:00
|
|
|
===============================================================================
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|