Skip to content
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

Add prettier as a dependency #36

Closed
wants to merge 1 commit into from

Conversation

bismitaguha
Copy link
Contributor

Description

Fixes #34

Type of Change:

  • Quality Assurance

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

N/A

Checklist:

  • My PR follows the style guidelines of this project
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • Any dependent changes have been published in downstream modules

Copy link

@sidvenu sidvenu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a script to package.json (perhaps format would be an appropriate alias) so that npm run format would just format the appropriate files for me? Refer: https://prettier.io/docs/en/cli.html

@sidvenu
Copy link

sidvenu commented Jul 2, 2020

@bismitaguha I just noticed your Zulip message. If you didn't understand what I commented here on GitHub, please do reply here itself so that I can keep a proper tab on the work.

Elaborating my earlier comment: we have scripts in npm, right? We run it by using npm run <script_name>. So I want you to add a script called format, that when you run npm run format, it automatically uses prettier to format all the files that are used for development.

For example, here's a format script I've used in a repo I maintain:

{
  // ...
  "scripts": {
    "format": "prettier --write \"**/*.{css,ts,tsx,js,jsx,json}\""
  },
  // ...
}

Running npm run format will then format all the css, ts, tsx, js, jsx and json files in the repository for me.

Note: the above was just an example, please don't use it directly.

@abha224 abha224 added the Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner. label Aug 31, 2020
@isabelcosta
Copy link
Member

Closing this, so another contributor can continue this work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a code formatter for standardising the code style
4 participants