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

Update linters script #79

Merged
merged 4 commits into from
May 2, 2024
Merged

Update linters script #79

merged 4 commits into from
May 2, 2024

Conversation

Diegogagan2587
Copy link
Owner

Implemented Changes:

we have updated the script lint in package.json in order to run all installed linting tools on this project with
a single command, son when you type npm run lint in your console the next linting tools will run:

  • eslint
  • styleint

This will avoid the developer having to run npx eslint "**/*.{js,jsx}" and npx stylelint "**/*.{css,scss}" separately in
the console, but run them together instead with a single command npm run lint which is easier to remember.

@Diegogagan2587 Diegogagan2587 added the enhancement New feature or request label Apr 30, 2024
@Diegogagan2587 Diegogagan2587 self-assigned this Apr 30, 2024
Copy link
Collaborator

@danifromecuador danifromecuador left a comment

Choose a reason for hiding this comment

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

Pull Request Rejection

Dear Diego,

Thank you for your contribution to the project! I appreciate the time and effort you've put into this pull request. However, after careful review, I've decided not to merge it at this time.

giphy

Reasons for Rejection

  1. The command npm run lint is working well, but I've found a little issue:
    If there are errors in both JS and CSS files, that command shows only JS errors, so the tester or user needs to fix all the JS errors and re-run the npm run lint command to see the CSS errors. This behavior can introduce misunderstandings because the user can think that all the JS & CSS linters errors are solved when there are still some CSS errors.
    Before introducing JSX linters errors:
    image
    as you can see, the CSS errors are being shown
    After introducing JSX linters errors:
    image
    as you can see, the CSS errors are NOT being shown

Next Steps

I encourage you to address the feedback provided and resubmit the pull request. Feel free to reach out if you have any questions or need further clarification.

Optional Suggestions

  1. Review this warning 29:6 warning React Hook useEffect has missing dependencies: 'API_URL_BASE' and 'token'. Either include them or remove the dependency array react-hooks/exhaustive-deps
    at this component /home/dani/WD/Book-a-concert-front-end/src/pages/DeleteConcertPage.jsx
    when running this command npm run lint

Thank you again for your contribution and understanding.

Best regards,
Dani

@Diegogagan2587
Copy link
Owner Author

Diegogagan2587 commented May 2, 2024

@danifromecuador Thanks so much for noting that out, I think that yeah, it's important to see at once all the linting errors to get a better perspective about what we are doing wrong, so I 'll correct, thanks! and regarding to your optional suggestion is something I'm working on in a different branch, thanks!

@Diegogagan2587
Copy link
Owner Author

Diegogagan2587 commented May 2, 2024

@danifromecuador After updating the script, now it will show both ESlint and Stylint results, I have added errors only in my local repo to generate some failings in linting tools to verify this behavior:
image

If there is something else let me know! thanks @danifromecuador

Copy link
Collaborator

@danifromecuador danifromecuador left a comment

Choose a reason for hiding this comment

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

Congratulations

Dear Diego, your PR is approved, you made a great effort and now both ESLint and Stylelint errors are being shown.
giphy

There is nothing else to say than:

Merge It!

@Diegogagan2587 Diegogagan2587 merged commit 42c6019 into development May 2, 2024
3 checks passed
@Diegogagan2587 Diegogagan2587 deleted the feat/linters-script branch May 12, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants