IBM / ibm-storage-odf-console

ibm-storage-odf-console provides IBM storage specific console page, which will be loaded by ODF console when end users access IBM storage. It's specially designed for displaying IBM specific storage attributes to customer. Current scope includes IBM flashsystem only.
Apache License 2.0
3 stars 7 forks source link

Incorporate linting for this repository #20

Closed rexagod closed 3 years ago

rexagod commented 3 years ago

Hello.

There are no linting pre-commit hooks present in this repository at the moment. I suggest adding husky and eslint to implement this functionality. Here are a few leads.

Thanks.

bipuladh commented 3 years ago

/assign @shdn-ibm

rexagod commented 3 years ago

@shdn-ibm I think #22 only addressed the second and third points. Please reopen, thanks.

shdn-ibm commented 3 years ago

Hi, @rexagod . I use git workflow hook to realize this. See https://github.com/IBM/ibm-storage-odf-console/blob/main/.github/workflows/eslint.yaml

rexagod commented 3 years ago

Yeah I saw that. However, the story was more along the lines of preventing a commit to happen if the lint checks don't pass, rather that committing lint errors on a branch and fixing that after GitHub reports those, which I think slows down the whole workflow.

Thanks.

shdn-ibm commented 3 years ago

add husky: https://github.com/IBM/ibm-storage-odf-console/pull/23

rexagod commented 3 years ago

Nice, did you incorporate the imports linting as well? This could potentially save devs working on this repository from a plethora of merge conflicts.

shdn-ibm commented 3 years ago

No, this repository does not have the eslint-plugin-console or the import/order rule

rexagod commented 3 years ago

I would suggest we incorporate this change for less overhead in the future.

shdn-ibm commented 3 years ago

I notice in console, it is defined in package eslint-plugin-console, there are some files to define the rule. Is there any method to extract the rule simply, instead of copy the file into this repo.