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 to contributing documentation #1167

Closed
simonw opened this issue Dec 31, 2020 · 3 comments
Closed

Add Prettier to contributing documentation #1167

simonw opened this issue Dec 31, 2020 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Dec 31, 2020

Following #1166 - the docs at https://docs.datasette.io/en/stable/contributing.html should include a section about JavaScript, and it should document how to run Prettier.

I run it in VS Code but it can be run on the command-line too:

npx prettier 'datasette/static/*[!.min].js' --write
@benpickles
Copy link
Contributor

Not sure where exactly to put the actual docs (presumably somewhere in docs/contributing.rst) but I've made a slight change to make it easier to run locally (copying the approach in excalidraw): main...benpickles:prettier-docs

@simonw simonw added this to the Datasette 0.54 milestone Jan 24, 2021
simonw added a commit that referenced this issue Jan 25, 2021
@simonw
Copy link
Owner Author

simonw commented Jan 25, 2021

Thanks @benpickles, I just merged that in. I'll use it in the documentation.

# To check code is conformant
npm run prettier -- --check
# To fix it if it isn't
npm run fix

@simonw simonw closed this as completed in f3a1555 Jan 25, 2021
@simonw
Copy link
Owner Author

simonw commented Jan 25, 2021

New documentation section here (I documented Black as well): https://docs.datasette.io/en/latest/contributing.html#code-formatting

This was referenced Jan 25, 2021
simonw added a commit that referenced this issue Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants