You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nbelzer: I think contributors would greatly benefit from a linting setup for both of these languages as it would remove the need to try and replicate the same code style and would enhance readability of the code as all will have a similar structure.
danielcompton: Yep, this seems like a good idea. SwiftFormat and Prettier would be my preferences for formatting. I have a weak preference for ESLint for linting JS, I have no opinions on linting Swift.
Based on this I think we should implement a Github action (or two) and perhaps a pre-commit hook for linting both Swift and JavaScript code.
Next to this we should probably set up some contribution guidelines as there are currently none.
The text was updated successfully, but these errors were encountered:
So these seem to be popular options for formatting and linting both Swift & JavaScript code:
Formatters
SwiftFormat :: (repo) seems to be a pretty advanced and mature formatter that can help enforce a chosen code style.
Prettier :: (website) can be used for any HTML, JavaScript, JSON and CSS we have. It is opinionated, simply enforcing a style to make sure we get on with our lives. An experimental plugin also exists for Swift.
Linting
ESLint :: (website) Seems to be a very standard choice for JavaScript linting.
SwiftLint :: (repo) Seems to be a very standard choice for Swift linting.
Personally I don't have a preference in terms of the configuration of these tools, I just prefer having them here as they make sure everyone adheres to a single style. I will try to set these tools up in the repo and see if there are any problems.
As specified in #175:
Based on this I think we should implement a Github action (or two) and perhaps a pre-commit hook for linting both Swift and JavaScript code.
Next to this we should probably set up some contribution guidelines as there are currently none.
The text was updated successfully, but these errors were encountered: