-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Run prettier on project. #6
Conversation
geekiam23
commented
May 10, 2023
- Run prettier on project to use single quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: it seems this PR is just for running Prettier. I was confused because the diff shows the changes for where you add the Prettier command. Can we clean up this diff so it can be reviewed more easily?
@geekiam23 what is the status of this PR? I'd like to either close this or move the PR forward so we can get this in or so someone else can pick it up. |
da9b76e
to
c576c27
Compare
Commander can automatically import files for us by specifying 'executableFile' for commands. This unfortunately doesn't work well with TypeScript, which was why we were using `node -r ts-node` to run the CLI instead of `ts-node`. This setup to get commander working was also causing other issues with file imports. This commit updates so we now manually import files for commands, which enables us to revert the less-conventional TypeScript config.
- Setup inquirer to ask questions about prettier config - If prettierrc/prettier.js or .prettierignore exists, it will not create any new files. - Add ts-node key to tsconfig.json to help with node typescript errors. - Add .prettierignore.template to use to write to .prettierignore. - Add formatFile to format any files we add to the project. - Add getProjectDir to get main directory of project.
Since the tool is only React Native for now, it didn't seem necessary to have the 'react-native' directory. Moved to 'src'. Also created utility for importing commands for commander
- Setup inquirer to ask questions about prettier config - If prettierrc/prettier.js or .prettierignore exists, it will not create any new files. - Add ts-node key to tsconfig.json to help with node typescript errors. - Add .prettierignore.template to use to write to .prettierignore. - Add formatFile to format any files we add to the project. - Add getProjectDir to get main directory of project.
1f262d5
to
9e2bd4c
Compare
62d3dd2
to
c4886b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Does this project have a Prettier config already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Add eslint path * Run linter * Remove log * Remove extra formatting file * Update to use thoughtbot eslint package * Remove overrides in template