kilowatts-io / kilowatts-grid

Open source live power market data for Great Britain
https://gb.kilowatts.io
MIT License
14 stars 3 forks source link

Setup linters for codebase concistency #155

Closed flexbox closed 8 months ago

flexbox commented 8 months ago

After digging a bit the codebase i noticed:

Here is what I use on all my projects to detect automatically some mistakes. https://github.com/flexbox/react-native-bootcamp/blob/main/challenges/ecosystem/02.md

first commit is to setup ESLint to avoid having "useless dead code"

image

second commit adds Prettier and ESLint rules only for React Native

CleanShot 2024-02-09 at 11 29 24

4th one ran the linter on all the codebase

+4,794 -3,253

😅 sorry about this one but we could change some rules now if you don't like it but they are mainly from react-native community

CleanShot 2024-02-09 at 11 46 08

we still have some "error" that we could fix over time

BenjaminWatts commented 8 months ago

Merci!