commit | 165a11978fbfe29c4bcd3a268fefe07ff1426460 | [log] [tgz] |
---|---|---|
author | Songtao Xia <[email protected]> | Thu Jan 28 14:09:40 2021 |
committer | Commit Bot <[email protected]> | Thu Jan 28 17:42:21 2021 |
tree | 27adac767cc8d023caf4898942287b20e6c363f6 | |
parent | a7b7b4946a4668d9138faab3d577b34b91b9ca5a [diff] [blame] |
add a ts-eslint rule to replace old eslint rule eslint's func-call-spacing rule does not work well with typescript. In particular, it confuses when we have a function type as a type parameter to a generic type constructor. eslint FAQ and issues suggest using the @typescript-eslint/func-call-spacing instead. Bug: 1170647 Change-Id: Icf888bf16db08e20d7a2321af893457d00627beb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2655875 Reviewed-by: Tim van der Lippe <[email protected]> Reviewed-by: Brandon Goddard <[email protected]> Commit-Queue: Songtao Xia <[email protected]>
diff --git a/.eslintrc.js b/.eslintrc.js index 4c9ca42..27eef35 100644 --- a/.eslintrc.js +++ b/.eslintrc.js
@@ -153,6 +153,9 @@ // run just the TypeScript semi rule, else we get duplicate errors 'semi': 0, '@typescript-eslint/semi': 2, + // func-call-spacing doesn't work well with .ts + 'func-call-spacing': 0, + '@typescript-eslint/func-call-spacing': 2, /** * Enforce that enum members are explicitly defined: