Closed Aghassi closed 5 years ago
Ouch. I didn't think of destructuring when making that change... The reason I made that change is that I'm trying to use more readable variable names (no acronyms).
How about making it:
const {packageJson} = require('read-pkg-up').sync();
?
@sindresorhus that's fine with me :).
Using
airbnb
+prettier
for ESlinting, I can't destructure the way I use to when reading a package. I now get this linting error:Parsing error: The keyword 'package' is reserved
Before I could do
But as of v6 I can't do the following without the above error
Can
pkg
be left for backwards compatibility? Or is there a better recommended way of importing? I guess I can this?Not sure why the property needed to be renamed, but just wanted to call out this issue in case others run into it.