-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancementNew feature or requestNew feature or requestpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Spinning off of #1033
Rules that need to have support added for optional chaining.
This list was based on a simple grep for MemberExpression
and CallExpression
, I haven't validated anything beyond that. There are probably extra rules that could do with support as well that don't check MemberExpression
and CallExpression
.
Rules that require a simple one-line change (i.e. adding a selector):
- consistent-type-assertions (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- explicit-function-return-type (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- func-call-spacing (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-array-constructor (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-floating-promises (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-inferrable-types (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-misused-promises (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-require-imports (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- no-var-requires (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- prefer-for-of (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- prefer-includes (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- prefer-readonly (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- prefer-regexp-exec (feat(eslint-plugin): optional chain support in rules (part 1) #1253)
- prefer-string-starts-ends-with (feat(eslint-plugin): [pref-str-starts/ends-with] optional chain support #1357)
- require-array-sort-compare (feat(eslint-plugin): more optional chain support in rules #1363)
- unbound-method (feat(eslint-plugin): more optional chain support in rules #1363)
Rules that require a larger enhancement to support (i.e. new feature in rule):
- no-unnecessary-condition (feat(eslint-plugin): [no-unnec-cond] check optional chaining #1315)
Extension rules that will be a pain to update (i.e. base extension rewrite):
- indent / indent-new-do-not-use
- no-extra-parens
- This one will be a huge pain, and I believe it will involve us duplicating the base rule. The logic is relatively complex, so this is a non-trivial task.
- no-unused-vars
Broken rules due to ESLint not supporting the new AST nodes:
- camelcase [camelcase] False positive with optional chaining #1196
- no-restricted-globals [no-restricted-globals] False positive with optional chaining #1090
- no-undef [no-undef] False positive with optional chaining #1116
- no-unused-expressions [no-unused-expressions] False positive with optional chaining #1138
- no-use-before-define [no-use-before-define] False positive with optional chaining #1104
martonlanga, sindresorhus, cevek, mcabrams, hampusborgos and 32 moresibeliusBrandonKowalski, furudean, frenic, yoyo930021, ctumolosus and 7 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin