eslint / typescript-eslint-parser

An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
Other
915 stars 92 forks source link

node.optional sometimes is on key, sometimes on ClassProperty #472

Closed duailibe closed 6 years ago

duailibe commented 6 years ago

What version of TypeScript are you using?

2.8.0-rc

What version of typescript-eslint-parser are you using?

14.0.0

What code were you trying to parse?

class X {
  foo?: string;
  "foo-bar"?: string;

What did you expect to happen?

Either the ClassProperty has optional: true or its key for both cases

What happened?

In the first case, optional: true is set on the key, and in the second case it's set on the ClassProperty

cc @JamesHenry