]> git.madduck.net Git - etc/vim.git/blob - doc/ale-typescript.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / doc / ale-typescript.txt
1 ===============================================================================
2 ALE TypeScript Integration                             *ale-typescript-options*
3
4
5 ===============================================================================
6 biome                                                    *ale-typescript-biome*
7
8                                                  *ale-options.biome_executable*
9                                                        *g:ale_biome_executable*
10                                                        *b:ale_biome_executable*
11 biome_executable
12 g:ale_biome_executable
13   Type: |String|
14   Default: `'biome'`
15
16                                                     *ale-options.biome_options*
17                                                           *g:ale_biome_options*
18                                                           *b:ale_biome_options*
19 biome_options
20 g:ale_biome_options
21   Type: |String|
22   Default: `''`
23
24   This variable can be set to pass additional options to `biome check` when
25   applying fixes.
26
27                                                  *ale-options.biome_use_global*
28                                                        *g:ale_biome_use_global*
29                                                        *b:ale_biome_use_global*
30 biome_use_global
31 g:ale_biome_use_global
32   Type: |Number|
33   Default: `get(g:, 'ale_use_global_executables', 0)`
34
35   See |ale-integrations-local-executables|
36
37                                          *ale-options.biome_fixer_apply_unsafe*
38                                                *g:ale_biome_fixer_apply_unsafe*
39                                                *b:ale_biome_fixer_apply_unsafe*
40 biome_fixer_apply_unsafe
41 g:ale_biome_fixer_apply_unsafe
42   Type: |Number|
43   Default: `0`
44
45   If set to `1`, biome will apply unsafe fixes along with safe fixes.
46
47                                            *ale-options.biome_lsp_project_root*
48                                                  *g:ale_biome_lsp_project_root*
49                                                  *b:ale_biome_lsp_project_root*
50 biome_lsp_project_root
51 g:ale_biome_lsp_project_root
52   Type: |String|
53   Default: `''`
54
55   If this variable is left unset, ALE will try to find the project root by
56   executing the following steps in the given order:
57
58   1. Find an ancestor directory containing a biome.json.
59   2. Find an ancestor directory containing a biome.jsonc.
60   3. Find an ancestor directory containing a package.json.
61   4. Find an ancestor directory containing a .git folder.
62   5. Use the directory of the current buffer (if the buffer was opened from
63      a file).
64
65
66 ===============================================================================
67 cspell                                                  *ale-typescript-cspell*
68
69 See |ale-cspell-options|
70
71
72 ===============================================================================
73 deno                                                      *ale-typescript-deno*
74
75 Starting from version 1.6.0, Deno comes with its own language server. Earlier
76 versions are not supported.
77
78
79 -------------------------------------------------------------------------------
80 Options
81                                                   *ale-options.deno_executable*
82                                                         *g:ale_deno_executable*
83                                                         *b:ale_deno_executable*
84 deno_executable
85 g:ale_deno_executable
86   Type: |String|
87   Default: `'deno'`
88
89                                             *ale-options.deno_lsp_project_root*
90                                                   *g:ale_deno_lsp_project_root*
91                                                   *b:ale_deno_lsp_project_root*
92 deno_lsp_project_root
93 g:ale_deno_lsp_project_root
94   Type: |String|
95   Default: `''`
96
97   If this variable is left unset, ALE will try to find the project root by
98   executing the following steps in the given order:
99
100   1. Find an ancestor directory containing a tsconfig.json.
101   2. Find an ancestor directory containing a .git folder.
102   3. Use the directory of the current buffer (if the buffer was opened from
103      a file).
104
105                                                     *ale-options.deno_unstable*
106                                                           *g:ale_deno_unstable*
107                                                           *b:ale_deno_unstable*
108 deno_unstable
109 g:ale_deno_unstable
110   Type: |Number|
111   Default: `0`
112
113   Enable or disable unstable Deno features and APIs.
114
115                                                   *ale-options.deno_import_map*
116                                                         *g:ale_deno_import_map*
117                                                         *b:ale_deno_import_map*
118 deno_import_map
119 g:ale_deno_import_map
120   Type: |String|
121   Default: `'import_map.json'`
122
123   Specify the import map filename to load url maps in a deno project.
124
125
126 ===============================================================================
127 dprint                                                  *ale-typescript-dprint*
128
129 See |ale-dprint-options| and https://dprint.dev/plugins/typescript
130
131
132 ===============================================================================
133 eslint                                                  *ale-typescript-eslint*
134
135 Because of how TypeScript compiles code to JavaScript and how interrelated
136 the two languages are, the `eslint` linter for TypeScript uses the JavaScript
137 options for `eslint` too. See: |ale-javascript-eslint|.
138
139
140 ===============================================================================
141 prettier                                              *ale-typescript-prettier*
142
143 See |ale-javascript-prettier| for information about the available options.
144
145
146 ===============================================================================
147 standard                                              *ale-typescript-standard*
148
149                                    *ale-options.typescript_standard_executable*
150                                          *g:ale_typescript_standard_executable*
151                                          *b:ale_typescript_standard_executable*
152 typescript_standard_executable
153 g:ale_typescript_standard_executable
154   Type: |String|
155   Default: `'standard'`
156
157   See |ale-integrations-local-executables|
158
159                                       *ale-options.typescript_standard_options*
160                                             *g:ale_typescript_standard_options*
161                                             *b:ale_typescript_standard_options*
162 typescript_standard_options
163 g:ale_typescript_standard_options
164   Type: |String|
165   Default: `''`
166
167   This variable can be set to pass additional options to standard.
168
169                                    *ale-options.typescript_standard_use_global*
170                                          *g:ale_typescript_standard_use_global*
171                                          *b:ale_typescript_standard_use_global*
172 typescript_standard_use_global
173 g:ale_typescript_standard_use_global
174   Type: |Number|
175   Default: `get(g:, 'ale_use_global_executables', 0)`
176
177   See |ale-integrations-local-executables|
178
179
180 ===============================================================================
181 tslint                                                  *ale-typescript-tslint*
182
183 This linter isn't recommended, because TSLint can't be used for checking for
184 problems while you type. You should probably use the tsserver plugin instead.
185 tsserver plugins are described here:
186 https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin
187
188 Follow the instructions on the plugin website for installing it:
189 https://github.com/Microsoft/typescript-tslint-plugin
190
191 Then disable TSLint in your typescript ftplugin file. >
192   let b:ale_linters_ignore = ['tslint']
193 <
194 Or in Lua: >
195   require("ale").setup.buffer({linters_ignore={"tslint"}})
196 <
197
198 -------------------------------------------------------------------------------
199 Options
200                                      *ale-options.typescript_tslint_executable*
201                                            *g:ale_typescript_tslint_executable*
202                                            *b:ale_typescript_tslint_executable*
203 typescript_tslint_executable
204 g:ale_typescript_tslint_executable
205   Type: |String|
206   Default: `'tslint'`
207
208   See |ale-integrations-local-executables|
209
210                                     *ale-options.typescript_tslint_config_path*
211                                           *g:ale_typescript_tslint_config_path*
212                                           *b:ale_typescript_tslint_config_path*
213 typescript_tslint_config_path
214 g:ale_typescript_tslint_config_path
215   Type: |String|
216   Default: `''`
217
218   ALE will first discover the tslint.json path in an ancestor directory. If no
219   such path exists, this variable will be used instead.
220
221                              *ale-options.typescript_tslint_ignore_empty_files*
222                                    *g:ale_typescript_tslint_ignore_empty_files*
223                                    *b:ale_typescript_tslint_ignore_empty_files*
224 typescript_tslint_ignore_empty_files
225 g:ale_typescript_tslint_ignore_empty_files
226   Type: |Number|
227   Default: `0`
228
229   When set to `1`, ALE will not report any problems for empty files with
230   TSLint. ALE will still execute TSLint for the files, but ignore any problems
231   reported. This stops ALE from complaining about newly created files,
232   and files where lines have been added and then removed.
233
234                                       *ale-options.typescript_tslint_rules_dir*
235                                             *g:ale_typescript_tslint_rules_dir*
236                                             *b:ale_typescript_tslint_rules_dir*
237 typescript_tslint_rules_dir
238 g:ale_typescript_tslint_rules_dir
239   Type: |String|
240   Default: `''`
241
242   If this variable is set, ALE will use it as the rules directory for tslint.
243
244                                      *ale-options.typescript_tslint_use_global*
245                                            *g:ale_typescript_tslint_use_global*
246                                            *b:ale_typescript_tslint_use_global*
247 typescript_tslint_use_global
248 g:ale_typescript_tslint_use_global
249   Type: |Number|
250   Default: `get(g:, 'ale_use_global_executables', 0)`
251
252   See |ale-integrations-local-executables|
253
254
255 ===============================================================================
256 tsserver                                              *ale-typescript-tsserver*
257
258                                    *ale-options.typescript_tsserver_executable*
259                                          *g:ale_typescript_tsserver_executable*
260                                          *b:ale_typescript_tsserver_executable*
261 typescript_tsserver_executable
262 g:ale_typescript_tsserver_executable
263   Type: |String|
264   Default: `'tsserver'`
265
266   ALE will first discover the tsserver path in an ancestor node_modules
267   directory. If no such path exists, this variable will be used instead.
268
269   If you wish to use only a globally installed version of tsserver, set
270   |g:ale_typescript_tsserver_use_global| to `1`.
271
272                                   *ale-options.typescript_tsserver_config_path*
273                                         *g:ale_typescript_tsserver_config_path*
274                                         *b:ale_typescript_tsserver_config_path*
275 typescript_tsserver_config_path
276 g:ale_typescript_tsserver_config_path
277   Type: |String|
278   Default: `''`
279
280   ALE will first discover the tsserver.json path in an ancestor directory. If
281   no such path exists, this variable will be used instead.
282
283                                    *ale-options.typescript_tsserver_use_global*
284                                          *g:ale_typescript_tsserver_use_global*
285                                          *b:ale_typescript_tsserver_use_global*
286 typescript_tsserver_use_global
287 g:ale_typescript_tsserver_use_global
288   Type: |Number|
289   Default: `get(g:, 'ale_use_global_executables', 0)`
290
291   This variable controls whether or not ALE will search for a local path for
292   tsserver first. If this variable is set to `1`, then ALE will always use the
293   global version of tsserver, in preference to locally installed versions of
294   tsserver in node_modules.
295
296
297 ===============================================================================
298 xo                                                          *ale-typescript-xo*
299
300                                          *ale-options.typescript_xo_executable*
301                                                *g:ale_typescript_xo_executable*
302                                                *b:ale_typescript_xo_executable*
303 typescript_xo_executable
304 g:ale_typescript_xo_executable
305   Type: |String|
306   Default: `'xo'`
307
308   See |ale-integrations-local-executables|
309
310                                             *ale-options.typescript_xo_options*
311                                                   *g:ale_typescript_xo_options*
312                                                   *b:ale_typescript_xo_options*
313 typescript_xo_options
314 g:ale_typescript_xo_options
315   Type: |String|
316   Default: `''`
317
318   This variable can be set to pass additional options to xo.
319
320                                          *ale-options.typescript_xo_use_global*
321                                                *g:ale_typescript_xo_use_global*
322                                                *b:ale_typescript_xo_use_global*
323 typescript_xo_use_global
324 g:ale_typescript_xo_use_global
325   Type: |Number|
326   Default: `get(g:, 'ale_use_global_executables', 0)`
327
328   See |ale-integrations-local-executables|
329
330
331 ===============================================================================
332   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: