mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-08 19:01:06 +08:00
Support both prettier and prettier-eslint
This commit is contained in:
@@ -45,20 +45,16 @@ prettier *ale-javascript-prettier*
|
||||
g:ale_javascript_prettier_executable *g:ale_javascript_prettier_executable*
|
||||
*b:ale_javascript_prettier_executable*
|
||||
Type: |String|
|
||||
Default: `'prettier-eslint'`
|
||||
Default: `'prettier'`
|
||||
|
||||
ALE will first discover the prettier-eslint path in an ancestor node_modules
|
||||
ALE will first discover the prettier path in an ancestor node_modules
|
||||
directory. If no such path exists, this variable will be used instead.
|
||||
|
||||
This variable can be set to change the path to prettier-eslint or if you want
|
||||
to use the original Prettier CLI.
|
||||
|
||||
If you wish to use only a globally installed version of prettier or
|
||||
prettier-eslint, set the set
|
||||
If you wish to use only a globally installed version of prettier set
|
||||
|g:ale_javascript_prettier_use_global| to `1`.
|
||||
|
||||
|
||||
g:ale_javascript_prettier_options *g:ale_javascript_prettier_options*
|
||||
g:ale_javascript_prettier_options *g:ale_javascript_prettier_options*
|
||||
*b:ale_javascript_prettier_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
@@ -66,16 +62,50 @@ g:ale_javascript_prettier_options *g:ale_javascript_prettier_options
|
||||
This variable can be set to pass additional options to prettier.
|
||||
|
||||
|
||||
g:ale_javascript_prettier_use_global *g:ale_javascript_eslint_use_global*
|
||||
*b:ale_javascript_eslint_use_global*
|
||||
g:ale_javascript_prettier_use_global *g:ale_javascript_prettier_use_global*
|
||||
*b:ale_javascript_prettier_use_global*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
This variable controls whether or not ALE will search for a local path for
|
||||
prettier-eslint-cli first. If this variable is set to `1`,
|
||||
then ALE will always use the global version of Prettier or Prettier-ESLint,
|
||||
depending on g:ale_javascript_prettier_executable, in preference to
|
||||
locally installed versions of Prettier / Prettier-ESLint in node_modules.
|
||||
prettier first. If this variable is set to `1`, then ALE will always use the
|
||||
global version of Prettier.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
prettier-eslint *ale-javascript-prettier-eslint*
|
||||
|
||||
g:ale_javascript_prettier_eslint_executable
|
||||
*g:ale_javascript_prettier_eslint_executable*
|
||||
*b:ale_javascript_prettier_eslint_executable*
|
||||
Type: |String|
|
||||
Default: `'prettier-eslint'`
|
||||
|
||||
ALE will first discover the prettier-eslint path in an ancestor node_modules
|
||||
directory. If no such path exists, this variable will be used instead.
|
||||
|
||||
If you wish to use only a globally installed version of prettier-eslint set
|
||||
|g:ale_javascript_prettier_eslint_use_global| to `1`.
|
||||
|
||||
|
||||
g:ale_javascript_prettier_eslint_options
|
||||
*g:ale_javascript_prettier_eslint_options*
|
||||
*b:ale_javascript_prettier_eslint_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to prettier-eslint.
|
||||
|
||||
|
||||
g:ale_javascript_prettier_eslint_use_global
|
||||
*g:ale_javascript_prettier_eslint_use_global*
|
||||
*b:ale_javascript_prettier_eslint_use_global*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
This variable controls whether or not ALE will search for a local path for
|
||||
prettier-eslint first. If this variable is set to `1`, then ALE will always
|
||||
use the global version of Prettier-eslint.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
16
doc/ale.txt
16
doc/ale.txt
@@ -10,7 +10,7 @@ CONTENTS *ale-contents*
|
||||
2. Supported Languages & Tools..........|ale-support|
|
||||
3. Global Options.......................|ale-options|
|
||||
4. Fixing Problems......................|ale-fix|
|
||||
5. Linter Options and Recommendations...|ale-linter-options|
|
||||
5. Integration Documentation............|ale-integrations|
|
||||
asm...................................|ale-asm-options|
|
||||
gcc.................................|ale-asm-gcc|
|
||||
c.....................................|ale-c-options|
|
||||
@@ -47,6 +47,8 @@ CONTENTS *ale-contents*
|
||||
eslint..............................|ale-javascript-eslint|
|
||||
flow................................|ale-javascript-flow|
|
||||
jshint..............................|ale-javascript-jshint|
|
||||
prettier............................|ale-javascript-prettier|
|
||||
prettier-eslint.....................|ale-javascript-prettier-eslint|
|
||||
standard............................|ale-javascript-standard|
|
||||
xo..................................|ale-javascript-xo|
|
||||
kotlin................................|ale-kotlin-options|
|
||||
@@ -770,14 +772,14 @@ from the file.
|
||||
|
||||
|
||||
===============================================================================
|
||||
5. Linter Options and Recommendations *ale-linter-options*
|
||||
5. Integration Documentation *ale-integrations*
|
||||
|
||||
Linter options are documented in individual help files. See the table of
|
||||
contents at |ale-contents|.
|
||||
Linter and fixer options are documented in individual help files. See the
|
||||
table of contents at |ale-contents|.
|
||||
|
||||
Every linter variable can be set globally, or individually for each buffer.
|
||||
For example, `b:ale_python_flake8_executable` will override any values
|
||||
set for `g:ale_python_flake8_executable`.
|
||||
Every option for programs can be set globally, or individually for each
|
||||
buffer. For example, `b:ale_python_flake8_executable` will override any
|
||||
values set for `g:ale_python_flake8_executable`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user