mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-18 20:10:58 +02:00
Specify specific prettier version (#186)
* Add explicit prettier version * Update CONTRIBUTING.md * Add .prettierrc.json file to ensure we always use es5 trailing commas
This commit is contained in:
parent
4b699fdab3
commit
9252807a51
@ -154,8 +154,8 @@ creating a pull requests with `python -m mypy .` from the `danswer/backend` dire
|
|||||||
|
|
||||||
|
|
||||||
#### Web
|
#### Web
|
||||||
We use `prettier` for formatting. Follow the guide [here](https://prettier.io/docs/en/install.html) to install, and run
|
We use `prettier` for formatting. The desired version (2.8.8) will be installed via a `npm i` from the `danswer/web` directory.
|
||||||
`npx prettier --write --trailing-comma es5 .` from the `danswer/web` directory to automatically format.
|
To run the formatter, use `npx prettier --write .` from the `danswer/web` directory.
|
||||||
Like `mypy`, we have no automated formatting yet (coming soon), but we request that, for now,
|
Like `mypy`, we have no automated formatting yet (coming soon), but we request that, for now,
|
||||||
you run this manually before creating a pull request.
|
you run this manually before creating a pull request.
|
||||||
|
|
||||||
|
3
web/.prettierrc.json
Normal file
3
web/.prettierrc.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"trailingComma": "es5"
|
||||||
|
}
|
@ -30,5 +30,8 @@
|
|||||||
"tailwindcss": "^3.3.1",
|
"tailwindcss": "^3.3.1",
|
||||||
"typescript": "5.0.3",
|
"typescript": "5.0.3",
|
||||||
"yup": "^1.1.1"
|
"yup": "^1.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "2.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user