Skip to content

Conversation

svandriel
Copy link
Contributor

@svandriel svandriel commented May 7, 2024

This PR contains some ESlint fixes, plus some minor improvements (most were SonarQube suggestions):

  • Remove the e.stack.split("\n").slice(0, 2).join("\n") + "\n" + err.stack; expressions, because they had no effect
  • Renamed toPrimitedType to toPrimitiveType (typo)
  • Refactored nested if ... else { if .... } to if ... else if .... else if
  • Replace type ? type : parseDefinition(...) with more concise type ?? parseDefinition(...)
  • Removed unread variable allMethods

edit: the eslint things are also handled in #81, I might rebase after that one gets merged

@dderevjanik
Copy link
Owner

dderevjanik commented May 7, 2024

Thanks for your PR! Will have a look

Do you think it would be possible to include sonarqube check as part of GH Actions? Would be nice to have some kind of badge or any other SonarQube verification on top of this Repo for better security feeling

EDIT: Ofc, in another PR :)

@svandriel
Copy link
Contributor Author

Do you think it would be possible to include sonarqube check as part of GH Actions? Would be nice to have some kind of badge or any other SonarQube verification on top of this Repo for better security feeling

I'm using my own SonarQube subscription here, I don't know if there's a 'free' SQ github action available.
However, the majority of these findings can also be found using a stricter eslint config. Might be best to look at that in the shorter term.

@dderevjanik
Copy link
Owner

Makes sense, let's merge this. Thanks ! :)

@dderevjanik dderevjanik merged commit 70cacd2 into dderevjanik:master May 7, 2024
@svandriel svandriel deleted the feature/eslint-fixes branch May 7, 2024 09:36
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