Has any one had success getting the new ?. operator in Javascript to pass jsHint? I have my project set up with esversion: 6 already, but I still get multiple errors. It appears that jsHint thinks it is an incorrect ternary operator. I'm aware I can have jsHint ignore the line, but I would prefer if I didn't have to do that each time I use the operator.
Asked
Active
Viewed 169 times
0
-
2JSHint is positively ancient – you should probably look at ESLint instead. – AKX May 18 '21 at 15:18
-
2It's not an ES6 feature - optional chaining is in the latest ES11 standard. – VLAZ May 18 '21 at 15:19
-
@AKX I agree, but it's not my call to make. – PCasagrande May 18 '21 at 15:30
-
@VLAZ That would explain it. Thanks. – PCasagrande May 18 '21 at 15:31
-
What's your node version? Please update to 14.x and try. – TopW3 May 18 '21 at 15:35
-
I'm on the newest version. I'm using this inside a grunt build process, so I don't think that's what is impacting it. – PCasagrande May 18 '21 at 16:54
-
1@VLAZ or ES2020 as ECMA calls it ;) – Heretic Monkey May 18 '21 at 17:11