Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@rollup/plugin-eslint] There is a conflict between @rollup/plugin-typescript and @rollup/plugin-eslint #1231

Closed
aiden271828 opened this issue Aug 2, 2022 · 2 comments

Comments

@aiden271828
Copy link

  • Rollup Plugin Name: @rollup/plugin-eslint
  • Rollup Plugin Version: 8.0.2
  • Rollup Version: 2.77.2
  • Operating System (or Browser): Windows
  • Node Version: 14.19.0
  • Link to reproduction (⚠️ read below): https://replit.com/@aiden271828/rollup?v=1

Expected Behavior

Resolve the conflict between @rollup/plugin-typescript and @rollup/plugin-eslint

Actual Behavior

@rollup/plugin-eslint uses the file compiled by @rollup/plugin-typescript for verification.

Additional Information

According to my example, there is no error when running npm run eslint, but there is an error when running npx rollup -c. The reason is that @rollup/plugin-eslint uses the file compiled by @rollup/plugin-typescript for verification.

I found a library to solve this problem. You can refer to it. https://www.npmjs.com/package/rollup-plugin-eslint2.

@shellscape
Copy link
Collaborator

Place the eslint plugin before the typescript plugin. This isn't an error with the eslint plugin, working as designed.

@aiden271828
Copy link
Author

aiden271828 commented Aug 2, 2022

@shellscape Place the eslint plugin before the typescript plugin. What should I do with it ?

Is that ? But this will still report an error

plugins: [
  eslint(),
  typescript(),
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants