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

Fix ESLint errors and Prettify entire codebase #566

Merged
merged 21 commits into from
Nov 28, 2023
Merged

Conversation

bludnic
Copy link
Member

@bludnic bludnic commented Nov 27, 2023

Better to review commit by commit. It will be hard to see what changed because of the prettier formatting.

  • Fixed ESLint errors
  • Prettify entire codebase
  • Run eslint and prettier on lint-staged
  • Enabled absolute imports in SCSS files (@/*)
  • Fixed BigInt is not defined error in IDE
  • Added commitlint with conventional config
  • Added npm run typecheck script
  • Include vite-*.config.ts files in tsconfig

@bludnic bludnic requested a review from martiliones November 27, 2023 16:40
Copy link

vercel bot commented Nov 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
adamant-im ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2023 2:25pm

Copy link

github-actions bot commented Nov 27, 2023

Deployed to https://msg-adamant-pr-566.surge.sh 🚀

@bludnic bludnic added this to the v4.4.0 milestone Nov 27, 2023
@bludnic bludnic changed the title ESLint and Prettify Fix ESLint errors and Prettify entire codebase Nov 27, 2023
@bludnic
Copy link
Member Author

bludnic commented Nov 27, 2023

Configure ESLint

Copy link
Collaborator

@martiliones martiliones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary eslint-disable comments.

Can we add this plugin? I remember you asking somebody to order imports in a pull request
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md

@bludnic
Copy link
Member Author

bludnic commented Nov 27, 2023

Remove unnecessary eslint-disable comments.

If you refer to the comments I added in this PR, that's ok. Comments will be removed after refactor (not in this PR).

@bludnic
Copy link
Member Author

bludnic commented Nov 27, 2023

Can we add this plugin? I remember you asking somebody to order imports in a pull request
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md

Yes, it's possible. I will add it.

@bludnic bludnic requested a review from martiliones November 27, 2023 21:30
@bludnic
Copy link
Member Author

bludnic commented Nov 28, 2023

Actually eslint-plugin-import doesn't sort imports. I added it anyway so we can catch other issues related to imports.

For sorting, I checked eslint-plugin-perfectionist. It works but I don't like how it sorts the imports (tested all styles). Ideally I would like to see node_modules imports at the top, and the projects imports at the bottom. Looks like this plugin can't do this.

There a files that imports Vuex store directly. Changing the imports order may break the app. I will handle this in other task.

@martiliones
Copy link
Collaborator

martiliones commented Nov 28, 2023

@bludnic What do you mean "eslint-plugin-import doesn't sort imports"? import/order rule I linked in the comment above does exactly that. Though, @/ imports should be configured via import/internal-regex

@bludnic
Copy link
Member Author

bludnic commented Nov 28, 2023

@martiliones Ok. Anyway I will leave sorting imports for another task because of reasons mentioned before.

@bludnic bludnic merged commit 7469103 into dev Nov 28, 2023
2 checks passed
@bludnic bludnic deleted the fix/eslint-config branch November 28, 2023 20:03
Copy link

Successfully tore down https://msg-adamant-pr-566.surge.sh 🥲

@bludnic bludnic mentioned this pull request Dec 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants