Skip to content

HDDS-14770. [Website] Integrate eslint and run it in github actions#359

Merged
errose28 merged 7 commits intoapache:masterfrom
yuriipalam:HDDS-14770
Mar 23, 2026
Merged

HDDS-14770. [Website] Integrate eslint and run it in github actions#359
errose28 merged 7 commits intoapache:masterfrom
yuriipalam:HDDS-14770

Conversation

@yuriipalam
Copy link
Contributor

@yuriipalam yuriipalam commented Mar 5, 2026

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 .js extension, while they are supposed to have .jsx extension, since they have React code inside.

  • pnpm run lint now runs eslint as well.
  • pnpm run lint:fix now 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.MD accordingly, 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.

  • The CI checks on my fork are passing
  • I verified the rendered content using a local preview
  • I manually verified the steps provided in this change work as described

@spacemonkd
Copy link
Contributor

Thanks a lot for this much needed change @yuriipalam.
Can you please add the rules for using single quotes, spacing between brackets and arrow functions to have brackets always?

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.

@spacemonkd spacemonkd self-requested a review March 5, 2026 11:39
@yuriipalam
Copy link
Contributor Author

@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.

Copy link
Contributor

@spacemonkd spacemonkd left a comment

Choose a reason for hiding this comment

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

Thanks for the patch @yuriipalam.
This LGTM, +1

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @yuriipalam

@yuriipalam yuriipalam requested a review from errose28 March 17, 2026 13:21
Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the updates. There's a build failure that needs to be fixed though.

@yuriipalam yuriipalam requested a review from errose28 March 23, 2026 14:54
@yuriipalam
Copy link
Contributor Author

@errose28 I pushed changes that should fix it, could you please approve the workflow?

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Running the CI now. Thanks for fixing the build.

@errose28 errose28 merged commit 3fb518b into apache:master Mar 23, 2026
11 checks passed
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.

3 participants