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

Feat add import rules for eslint #37

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

AmirHossein-z
Copy link
Member

No description provided.

Copy link
Member

@AmirHosseinKarimi AmirHosseinKarimi left a comment

Choose a reason for hiding this comment

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

Setting up the ESLint rules is a good idea.
But please note these:

  1. The code formatter (Prettier) & Linter (ESLint) should work integrated. It means the code formatter should fix the linter issues & the linter should accept the formatted code.
    In This case, Sorting rules are added to the linter, But the code formatter does not sort the lines!
  2. I think the new-line between each import is not a good idea. We can remove this rule.

Copy link
Member

Choose a reason for hiding this comment

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

The commit message type can be refactor instead of fix.
It's not a bug-fix issue, it's refactoring the code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I' fix the eslint to fix lint issue on save.I think you got it wrong.import files are seperated base on their group not on every import line and also I think if our import files in some files are too much,that way,new-line between imports will be a good idea.

Copy link
Member

Choose a reason for hiding this comment

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

Okay. Now I can say it's a good idea and we can apply this rule.
However, according to the current situation of the repository with multiple pull-request pending for merge, I think it's better to hold this PR for the future to prevent these rule's side effects on other PRs.
We can come back and apply these rules when we are good in the timing plan.

@AmirHosseinKarimi AmirHosseinKarimi added the code-quality Improve code quality label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Improve code quality
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

2 participants