chore: format the application with prettier and lint
Description
Briefly explain the purpose of this pull request
Format files and use linters to have a coding convention for everyone to use for readability / code quality and easier debugging time.
What has been done
Added scripts:
"format:check" to check folder apps / docs / and tests folder ( can be changed later if used a different folder for testing the application
"format": will fix the formatting in files from the folders apps / docs / tests only
"format:all" will fix the formatting in files from all the application with exception from .gitignore as prettierignore is not existant.
"format:check": will check and give information about the formatting in files from the folders apps / docs / tests only
"format:checkall" will check and give information about the formatting in files from all the application with exception from .gitignore as prettierignore is not existant.
"lint": will fix ( as much as it can ) files from the folders apps / docs / tests only ( markdown files too )
"lint:all": will fix ( as much as it can ) files from the entire application ( markdown files too )
"lint:check": will give information about problems found in files from the folders apps / docs / tests only
"lint:checkall": will give information about problems found in files from the entire application
Added a pre-commit hook with husky using prettier-quick who will format files according to prettier preference while commiting files. Only staged files will be formatted.
Target files
js,jsx,ts,tsx,mjs,cjs,md
Solves #34
Are there any specific user stories or issues addressed by this PR?
No specific stories
issue resolve #34
As eslint use prettier too, both as been resolved in the same time.
module that need to be updated are done to not have conflict between them for the current build.
...
Testing
Run each command to test the result of each of them.
lint:check =>
lint:checkall
lint:
lint:all =>
format:check =>
format:checkall =>
format =>
format:all =>
Test of precommit hook =>
While adding a component in the apps folder,
we have a new line added "✍️ Fixing up app/components/falseComponent.tsx."
that we didn't have in the precedent commit.
So the formating was done at this time.
For the last commit, I resolved the error shown in the lint:all command.
So, we have now an application that give only warning and no error and only one will be definitively ignored by the linter.
Breaking Changes (optional)
No breaking change
Checklist
[ ] I have added unit tests for my changes. (If applicable)
[X] I have manually tested the changes and verified they work as expected.
[X] I have followed the coding style guide.
[ ] I have updated the documentation to reflect the changes, including any breaking changes.
[ ] I have created regression tests for the feature I am adding.
Reviewer Checklist
[ ] Automated test coverage is satisfactory. (If applicable)
[X] PR is fully functional.
[ ] PR regressions tested.
[] Documentation regarding the PR has been properly updated.
solve #34
chore: format the application with prettier and lint
Description
Briefly explain the purpose of this pull request
Format files and use linters to have a coding convention for everyone to use for readability / code quality and easier debugging time.
What has been done
Added scripts: "format:check" to check folder apps / docs / and tests folder ( can be changed later if used a different folder for testing the application
"format": will fix the formatting in files from the folders apps / docs / tests only "format:all" will fix the formatting in files from all the application with exception from .gitignore as prettierignore is not existant.
"format:check": will check and give information about the formatting in files from the folders apps / docs / tests only "format:checkall" will check and give information about the formatting in files from all the application with exception from .gitignore as prettierignore is not existant.
"lint": will fix ( as much as it can ) files from the folders apps / docs / tests only ( markdown files too ) "lint:all": will fix ( as much as it can ) files from the entire application ( markdown files too )
"lint:check": will give information about problems found in files from the folders apps / docs / tests only "lint:checkall": will give information about problems found in files from the entire application
Added a pre-commit hook with husky using prettier-quick who will format files according to prettier preference while commiting files. Only staged files will be formatted.
Target files
js,jsx,ts,tsx,mjs,cjs,md
Solves #34
Are there any specific user stories or issues addressed by this PR?
No specific stories issue resolve #34
As eslint use prettier too, both as been resolved in the same time. module that need to be updated are done to not have conflict between them for the current build.
...
Testing
Run each command to test the result of each of them. lint:check =>
lint:checkall
lint:
lint:all =>
format:check =>
format:checkall =>
format =>
format:all =>
Test of precommit hook => While adding a component in the apps folder, we have a new line added "✍️ Fixing up app/components/falseComponent.tsx." that we didn't have in the precedent commit. So the formating was done at this time.
For the last commit, I resolved the error shown in the lint:all command. So, we have now an application that give only warning and no error and only one will be definitively ignored by the linter.
Breaking Changes (optional)
No breaking change
Checklist
Reviewer Checklist