msd-d / PetHub

An app for animal adoption.
1 stars 0 forks source link

Add format:check and format. for a cleaner code base #14

Closed kepet19 closed 3 years ago

kepet19 commented 3 years ago

Ready for review.

Add


Fix

kepet19 commented 3 years ago

Nice! now I can't get commits for formatting :)

whoa maybe you should add a git hooks before git commits :b ./node_modules/.bin/prettier --check App.js components or npm run format:check

Joergenson commented 3 years ago

Neat!

Let's get the test app

Nice! now I can't get commits for formatting :)

whoa maybe you should add a git hooks before git commits :b ./node_modules/.bin/prettier --check App.js components or npm run format:check

True 🤣

kepet19 commented 3 years ago

Neat!

Let's get the test app

Nice! now I can't get commits for formatting :)

whoa maybe you should add a git hooks before git commits :b ./node_modules/.bin/prettier --check App.js components or npm run format:check

True rofl

I can't remember how to do it doe xD can you make that in a .git/config ?

Joergenson commented 3 years ago

Looking good!

Two questions though: Should we write .js after importing our own files, because right now we do it sometimes but not always? I saw that you added it in the gradient-button.js but not in the other files.

When importing, should we use curly brackets to be consistent, or only use them when importing as more than one? e.g.

import { LinearGradient } from "expo-linear-gradient";
import MaskedView from "@react-native-masked-view/masked-view";
import { StyleSheet, Text } from "react-native";

Curley brackets depend on the component. from react-native it is because it doesn't default export

Joergenson commented 3 years ago

I agree with the .js thing it should not be included :->

Joergenson commented 3 years ago

Looking good!

Two questions though: Should we write .js after importing our own files, because right now we do it sometimes but not always? I saw that you added it in the gradient-button.js but not in the other files.

When importing, should we use curly brackets to be consistent, or only use them when importing as more than one? e.g.

import { LinearGradient } from "expo-linear-gradient";
import MaskedView from "@react-native-masked-view/masked-view";
import { StyleSheet, Text } from "react-native";

But forgot to refractor the imports after I redid the exports on the components so in this case, It shouldn't have curly brackets on the gradient components

Kechr commented 3 years ago

Looking good! Two questions though: Should we write .js after importing our own files, because right now we do it sometimes but not always? I saw that you added it in the gradient-button.js but not in the other files. When importing, should we use curly brackets to be consistent, or only use them when importing as more than one? e.g.

import { LinearGradient } from "expo-linear-gradient";
import MaskedView from "@react-native-masked-view/masked-view";
import { StyleSheet, Text } from "react-native";

Curley brackets depend on the component. from react-native it is because it doesn't default export

Huh, havde jeg ikke lige overvejet. TIL I guess

Joergenson commented 3 years ago

Looking good! Two questions though: Should we write .js after importing our own files, because right now we do it sometimes but not always? I saw that you added it in the gradient-button.js but not in the other files. When importing, should we use curly brackets to be consistent, or only use them when importing as more than one? e.g.

import { LinearGradient } from "expo-linear-gradient";
import MaskedView from "@react-native-masked-view/masked-view";
import { StyleSheet, Text } from "react-native";

Curley brackets depend on the component. from react-native it is because it doesn't default export

Huh, havde jeg ikke lige overvejet. TIL I guess

https://stackoverflow.com/questions/36795819/when-should-i-use-curly-braces-for-es6-import

Det er en kunst

kepet19 commented 3 years ago

Just to be sure we remove all .js from import right ?

Kechr commented 3 years ago

Just to be sure we remove all .js from import right ?

Ye

Joergenson commented 3 years ago

Just to be sure we remove all .js from import right ?

Ye

where do we have that tho cant find any?

Joergenson commented 3 years ago

oh nvm

kepet19 commented 3 years ago

Right here! https://github.com/msd-d/PetHub/pull/14/commits/ee7aeef0c778f2210d20f4b208c998fbe1785c3a

Joergenson commented 3 years ago

only 3 places tho :ez: