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.
Changes
Major Changes
Add
prettier
andeslint-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 aprettier
config file, and handling conflicts witheslint
viaeslint-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 betweenprettier
andeslint
, which is included in the Vite React template by default. Witheslint-config-prettier
included, just addingprettier
to.eslintrc.cjs
completes the setup.Notes
N/A