Minor: package structure in formatters confusing eslint
- Include the version of json2csv used and the interface that you are using (plainjs, node or whatwg).
- version 7.0.1
- Include your node version or your browser vendor and version.
- node 16.x
- Include the command or code you used.
- npm install
- npm run lint
- Include a sample dataset that we can test against.
- https://github.com/deej-split/json2csv-formatters-problem
- Include your expected output and the actual output/error.
- no error.
This seems like kinda a follow on to a couple of the issues reporting that the package.json file for formatters was pointing to the wrong main file. 7.0.1 has fixed that for me, which means I can upgrade. Thank you!
In the process, I saw eslint was reporting an error when we were require'ing @json2csv/formatters but not .../node or .../transforms. I was able to throw together a tiny repo to demonstrate this (just do the install and then run the lint package script), and you'll see the error.
I didn't take time to figure out what is different between formatters and the others. And this isn't a blocker, as I can put an eslint-disable comment in my code. mainly just flagging this in case others have problems or it is a symptom of something deeper.
This is really weird...
If you compare the package.json between formatters and node or transforms, they are exactly the same.
And the package resolves correctly in node.
The issue is related to eslint-config-airbnb. If you remove it, then it works.
I wonder what is AirBnB configuring differently to make this fail...