datle-dev / yubi

Minimalist typing test
MIT License
0 stars 0 forks source link

Configure frontend with prettier formatting #2

Closed datle-dev closed 3 months ago

datle-dev commented 3 months ago

Changes

Major Changes

Add prettier and eslint-config-prettier packages, configure, then format existing .js/.jsx files.

Bug Fixes / Minor Changes

N/A

Why

Repo should have consistent, automated formatting before continuing with further development.

How

Installing both packages via npm, creating a prettier config file, and handling conflicts with eslint via eslint-config-prettier completes the setup.

prettier allows for specification of a config file with rules on how a given .js/.jsx file should be formatted.

eslint-config-prettier resolves conflicts between prettier and eslint, which is included in the Vite React template by default. With eslint-config-prettier included, just adding prettier to .eslintrc.cjs completes the setup.

Notes

N/A