cyntler / hamburger-react

Animated hamburger menu icons for React.js weighs only 1.5 KB.
https://hamburger-react.netlify.app
MIT License
964 stars 36 forks source link

dist-cjs error in eslint #16

Closed sandric closed 4 years ago

sandric commented 4 years ago

For some reason my eslint falling with error on file where I import Hamburger. Project is on typescript, and everything is working as should actually, so its eslint-only issue. Not sure what causes it, but it fails on simple eslint --fix <file where you import hamburger>

eslint

luukdv commented 4 years ago

I might have a clue about why eslint fails on this one. Will look into it, thanks.

sandric commented 4 years ago

Update: if I add node: true to eslint import/resolver config - no error:

  ...
  settings: {
    "import/resolver": {
      node: true,
      alias: {
        map: [["src", "./src"]],
        extensions: [".ts", ".tsx", ".json"],
      },
    },
  },
  ...
luukdv commented 4 years ago

@sandric I'm not able to reproduce this yet, could you check if the changes applied in https://github.com/luukdv/hamburger-react/commit/8149bd15dff1c12df1c4f38b3f2890e6393d96a0 would solve this issue?