ESLint: import/prefer-default-export

2020. 10. 13. 21:42유튜브 클론 코딩

앞서 전 글에서 Prettier를 건드리다가 작동하지 않아서 ESLint문제 같아서 싹 다 갈아엎고 ESLint와 plugin을 다시 깔았다.
예전에 깔 땐 eslint-plugin-import까지 같이 깔렸었는데 다시 깔으니까 같이 깔리지 않았다.
그 때문인가 import/prefer-default-export라며 ESLint가 오지게 갈군다.

보는 바와 같이 오른쪽에 모든 코드가 빨간 줄 처리 되어버렸다.

구글링을 통해 stackoverflow에서 이러한 경우에 ESLint rules를 추가하여 해결할 수 있다고 한다.
자세한 건 밑의 링크를 참고하시길 바랍니다:)


https://stackoverflow.com/questions/52627477/eslint-prefer-default-export-import-prefer-default-export

 

ESLint Prefer default export import/prefer-default-export

Hi there I am struggling to understand / have this eslint error disappear with my React Project. Prefer default export import/prefer-default-export Helpers.js error is pointing to: export funct...

stackoverflow.com

보는 바와 같이 rules를 추가해주니 ESLint가 더이상 잔소리하지 않았다.