brainlife / ezbids

A web service for semi-automated conversion of raw imaging data to BIDS
https://brainlife.io/ezbids
MIT License
26 stars 13 forks source link

Btp 26 add git hooks and linter #102

Closed nicoalee closed 11 months ago

nicoalee commented 11 months ago

This PR adds code standards to the ezBIDS repo by linting and formatting code. It aims to improve code quality in ezBIDS in two ways:

HOW TO TEST

1) checkout to this branch 2) download the recommended extensions (if you haven't yet) by following the readme 3) run npm install in both the ezbids and UI folders 4) Go to any .ts file in the api folder and save it. See if it auto formats for you.

  1. Go to .vue file in the ui folder and save it. See if it auto formats for you.
  2. With these two files that have been updated, run git add ... and try and try and git commit them. If either of these files have errors, confirm that the commit fails.

SUMMARY OF CHANGES

1) Add formatting on save so that it is easy to format code in a standardized fashion. 2) Add linting so that we can follow best code practices when developing in a given language