karmada-io / website

Karmada website and documentation repo
https://karmada.io
Creative Commons Attribution 4.0 International
29 stars 120 forks source link

ADD Eslint rules for the app #436

Open punithnayak opened 1 year ago

punithnayak commented 1 year ago

What would you like to be added: To maintain standardized coding styles let us add eslint configuration

Why is this needed: To maintain uniformity in the code https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin

RainbowMango commented 1 year ago

Looks good to me after taking a glance at the ESLint. But I still don't know what specific issues the ESLint can detect. Do we need a demo?

rakshitgondwal commented 1 year ago

I can't seem to figure out how ESLint would exactly work as a pluginšŸ¤” Would it show us the errors inside the IDE or how? Also, I can't seem to think about any use cases of the only 2 rules supported by ESLint. Can you put some light in here please? @punithnayak

Instead what I suggest is to use a linter that would run as a GitHub Action workflow. I think https://github.com/gaurav-nelson/github-action-markdown-link-check would be a good option if we are to go for this idea. WDYT? @RainbowMango

But obviously, if there are some particular use cases for ESLint that needs to have a check for, we can integrate these both too.

shivansh-bhatnagar18 commented 3 months ago

@rakshitgondwal @RainbowMango Integrating ESLint in our code will help us keep track of the incoming Pull Requests in the future and maintain good coding practices if we add it as a GitHub workflow.