-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Eslint and Prettier configs #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Typescript version
…Typescript version
… into suraj/fixEslint
Ah nice catch! The weirdness came about because we set the organizeImports field to true in vscode settings.json file which was conflicting with the eslint rule for import organization |
ronniebeggs
added a commit
that referenced
this pull request
Oct 18, 2023
* [feat] implement bottom tab notification (copy code from previous failed PR). * [fix] update expo dependcies. * [fix] update escape-string-regexp dependency. * [feature] welcome screen (#10) * edge case and fixed nav * move styled button --------- Co-authored-by: Melissa Liu <[email protected]> Co-authored-by: Stephanie Wong <[email protected]> * Update Eslint and Prettier configs (#15) * Update ESLint and Prettier config to match Expo docs and most recent Typescript version * Update ESLint and Prettier config to match Expo docs and most recent Typescript version * Removed organizeImports from vscode settings.json and added .eslintignore * [auth] Login and Sign Up (#14) Basic log in and sign up authentication implemented with screens and queries * [feat] implement bottom tab notification (copy code from previous failed PR). * [fix] update expo dependcies. * [fix] update escape-string-regexp dependency. * [feat] create updates tab. * [fix] fix dependency issues. * [fix?] weird typescript errors are back. --------- Co-authored-by: me-liu <[email protected]> Co-authored-by: Melissa Liu <[email protected]> Co-authored-by: Stephanie Wong <[email protected]> Co-authored-by: surajr10 <[email protected]> Co-authored-by: Stephanie Wong <[email protected]>
me-liu
added a commit
that referenced
this pull request
Nov 6, 2023
* [feat] implement bottom tab notification (copy code from previous failed PR). * [fix] update expo dependcies. * [fix] update escape-string-regexp dependency. * [feature] welcome screen (#10) * edge case and fixed nav * move styled button --------- Co-authored-by: Melissa Liu <[email protected]> Co-authored-by: Stephanie Wong <[email protected]> * Update Eslint and Prettier configs (#15) * Update ESLint and Prettier config to match Expo docs and most recent Typescript version * Update ESLint and Prettier config to match Expo docs and most recent Typescript version * Removed organizeImports from vscode settings.json and added .eslintignore * [auth] Login and Sign Up (#14) Basic log in and sign up authentication implemented with screens and queries * [feat] implement bottom tab notification (copy code from previous failed PR). * [fix] update expo dependcies. * [fix] update escape-string-regexp dependency. * [feat] create updates tab. * [fix] fix dependency issues. * [fix?] weird typescript errors are back. --------- Co-authored-by: me-liu <[email protected]> Co-authored-by: Melissa Liu <[email protected]> Co-authored-by: Stephanie Wong <[email protected]> Co-authored-by: surajr10 <[email protected]> Co-authored-by: Stephanie Wong <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new in this PR
Removed the Calblueprint Eslint and Prettier packages along with all their peer dependencies and replaced with the Eslint and Prettier configs that are listed in the Expo docs. Also added an Eslint ignore field and removed the organizeImports field in VSCode settings fiel. Then fixed all Eslint and Prettier issues in the project.
Description
This remedy was sought after due to a version mismatch for Typscript, where Expo wanted Typescript version 5 and our Calblueprint eslint config package was using a lower version. Due to the difficulty of keeping up the Calblueprint eslint and prettier packages to match with changes in other packages and version matching with tools such as Expo and NextJS, I felt it best to just use the maintained packages that were recommended on the Expo docs for this PR as they encompassed most, if not all, the rules we were requiring.
The Eslint ignore file was added to speed up running eslint by not running it on unnecessary folders. The organizeImports field on the VSCode settings.json file was removed because it was conflicting with the Eslint import order rules.
How to review
Once devs have rebased or pulled changes from main, run npm install to get all the new packages for the project.
Try to run the following commands:
Also just check to make sure that if you're using VSCode, that saving a file with prettier errors like mis-aligned tabs, etc. get fixed upon saving a file.
Next steps
You all on your project may find that certain Eslint and Prettier rules are not ideal (usually these are on the styling end of the spectrum) or you would like to have some other ones that may be missing, so feel free to play around with the .eslintrc.js and .prettier.js or install other eslint packages to help get you to a code ruleset that feels right for you.
Relevant Links
https://docs.expo.dev/guides/using-eslint/
https://www.headway.io/blog/react-native-quick-start-expo-eslint-typescript-and-prettier
Online sources
Related PRs
CC: @stephaniewong2