DianaSuvorova / eslint-plugin-react-redux

Enforcing best practices for react-redux

Home Page:https://www.npmjs.com/package/eslint-plugin-react-redux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node v8: `Unexpected token {`

DianaSuvorova opened this issue Β· comments

@ljharb I feel like you might know the answer for this.

I was looking at the #80 Looks like for node v12,16 it does nor matter it defaults to index.js and is able to use un-compiled code directly from index.js

If I test with node v8 I get Unexpected token { regardless of whether I have dist folder included or not.
It looks like to me that the build & prepublishOnly scripts don't really do much

    "build": "rm -fr ./dist && babel ./lib --out-dir ./dist --copy-files",
    "prepublishOnly": "npm test && npm run build"

Now what is the right way to support v8 in this case? Thank you πŸ™

Looking at https://unpkg.com/browse/eslint-plugin-react-redux@3.3.4/, the "main" points to https://unpkg.com/browse/eslint-plugin-react-redux@3.3.4/dist/index.js, but that doesn't exist. There is an index.js at the root tho.

I think maybe https://github.com/DianaSuvorova/eslint-plugin-react-redux/blob/master/index.js needs to be moved into lib, so that it ends up in dist.

πŸŽ‰ This issue has been resolved in version 4.0.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€