HDDS-14770. [Website] Integrate eslint and run it in github actions#359
HDDS-14770. [Website] Integrate eslint and run it in github actions#359errose28 merged 7 commits intoapache:masterfrom
Conversation
|
Thanks a lot for this much needed change @yuriipalam. I am not sure if this is being currently used or if it would be used in the future, but enforcing this would be great. |
|
@devabhishekpal thanks for the review. For this I'm planning to add Prettier in the next PR. It enforces all the code formatting rules, so they are consistent. What you said could be also enforced by eslint alone, but since I'm planning to add Prettier in the subsequent PR, it's better to do it there. I'll enforce exactly what you've requested. |
spacemonkd
left a comment
There was a problem hiding this comment.
Thanks for the patch @yuriipalam.
This LGTM, +1
errose28
left a comment
There was a problem hiding this comment.
Thanks for adding this @yuriipalam
errose28
left a comment
There was a problem hiding this comment.
LGTM, thanks for the updates. There's a build failure that needs to be fixed though.
|
@errose28 I pushed changes that should fix it, could you please approve the workflow? |
errose28
left a comment
There was a problem hiding this comment.
Running the CI now. Thanks for fixing the build.
What changes were proposed in this pull request?
Integrate ESLint into the project.
ESLint is a static code analyzer, so now we have analyzer during the development.
Both tools were integrated, as well as relevant extensions to them, e.g., Docusaurus ESLint plugin
Fixed all the issues that the code analyzers found. Some files had
.jsextension, while they are supposed to have.jsxextension, since they have React code inside.pnpm run lintnow runseslintas well.pnpm run lint:fixnow applies auto-fixes from ESLint as well.Strongly recommend you to check
eslint.config.mjs, since it sets up the code rules for the project. I also added a custom rule that enforces the license header.I also updated
CONTRIBUTE.MDaccordingly, the "Quick Start" section and added a new "Linting and Formatting" section.What is the link to the Apache Jira?
HDDS-14770
How was this patch tested?
Check off which of the following tests were done on this change. If additional testing was done, please elaborate here as well.