Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create eslint and prettier configuration for TS #68

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

jorgenbele
Copy link
Contributor

The README states that this project uses prettier to format all typescript code, but the default prettier configuration does not match the formatting style used thus far. This PR matches better than the default configuration.

Based on (but modified slightly): https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project

@jorgenbele jorgenbele force-pushed the feat-add-eslint-and-prettier branch from d98d75f to 9d41975 Compare June 17, 2020 12:15
This requires some additional dev packages to be
installed, therefore `package.json` and `package-lock`
has been updated.
@jorgenbele jorgenbele force-pushed the feat-add-eslint-and-prettier branch from 9d41975 to 6c2dd5c Compare June 17, 2020 12:17
@jorgenbele
Copy link
Contributor Author

Reformatting all code under src/ results in:

 src/App.test.tsx                                   |  10 +-
 src/App.tsx                                        |  14 +-
 src/auth.tsx                                       |   2 +-
 src/colorscheme.css                                |  38 ++--
 src/components/dialogue/Dialogue.tsx               |  47 ++--
 src/components/filterBuilder/FilterBuilder.css     |  10 +-
 src/components/filterBuilder/filterBuilder.tsx     | 188 +++++++--------
 src/components/header/Header.css                   | 253 ++++++++++-----------
 src/components/header/Header.tsx                   |  68 +++---
 src/components/profile/Profile.css                 |  17 +-
 src/components/profile/Profile.tsx                 | 134 +++++------
 src/components/profileList/ProfileList.css         |   5 +-
 src/components/profileList/ProfileList.tsx         |  66 +++---
 src/components/react-table/Table.tsx               |  48 ++--
 src/components/react-table/table.css               | 157 +++++++------
 src/components/spinners/Spinner.tsx                |  20 +-
 .../time-interval-select/TimeInterval.tsx          |  88 ++++---
 .../time-interval-select/timeInterval.css          |  62 +++--
 src/components/time-interval/TimeIntervals.tsx     |  78 ++-----
 src/components/time-slot/TimeSlot.tsx              |  81 ++++---
 src/handleFeide.tsx                                |  22 +-
 src/index.css                                      |  12 +-
 src/index.tsx                                      |  16 +-
 src/protected.route.tsx                            |  42 ++--
 src/serviceWorker.ts                               |  54 ++---
 src/store.tsx                                      |  19 +-
 src/variables.css                                  |  10 +-
 src/views/alertView/AlertView.tsx                  |  35 ++-
 .../filterBuildingView/filterBuildingView.tsx      |  14 +-
 src/views/loginView/LoginView.css                  |  23 +-
 src/views/loginView/LoginView.tsx                  | 100 ++++----
 .../NotificationProfileView.tsx                    |  12 +-
 32 files changed, 796 insertions(+), 949 deletions(-)

We might be able to reduce the amount of necessary changes by tinkering with prettier.

Copy link
Contributor

@havfo havfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@hmpf hmpf merged commit 90e679d into Uninett:master Jun 19, 2020
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.

None yet

3 participants