Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Document that we use Prettier.
Anders Kaseorgab6ed22bffcb
diff --git a/README.md b/README.mdindex 78e57b5094b..aa0f84c1235 100644--- a/README.md+++ b/README.md@@ -11,6 +11,7 @@ largest and fastest growing open source group chat project.[](https://circleci.com/gh/zulip/zulip/tree/master)[](https://codecov.io/gh/zulip/zulip/branch/master)[][mypy-coverage]+[](https://github.com/prettier/prettier)[](https://github.com/zulip/zulip/releases/latest)[](https://zulip.readthedocs.io/en/latest/)[](https://chat.zulip.org)diff --git a/docs/contributing/code-style.md b/docs/contributing/code-style.mdindex b45e3d3bb2d..b80ca81d254 100644--- a/docs/contributing/code-style.md+++ b/docs/contributing/code-style.md@@ -251,19 +251,11 @@ code a lot uglier, in which case it's fine to go up to 120 or so.### JavaScript and TypeScript-When calling a function with an anonymous function as an argument, use-this style:-- my_function('foo', data => {- var x = ...;- // ...- });--The inner function body is indented one level from the outer function-call. The closing brace for the inner function and the closing-parenthesis for the outer call are together on the same line. This style-isn't necessarily appropriate for calls with multiple anonymous-functions or other arguments following them.+Our JavaScript and TypeScript code is formatted with+[Prettier](https://prettier.io/). You can ask Prettier to reformat+all code via our [linter tool](../testing/linters.md) with `tools/lint+--only=prettier --fix`. You can also [integrate it with your+editor](https://prettier.io/docs/en/editors.html).Combine adjacent on-ready functions, if they are logically related.diff --git a/docs/testing/linters.md b/docs/testing/linters.mdindex c2fc8548c3a..570f1a651a4 100644--- a/docs/testing/linters.md+++ b/docs/testing/linters.md@@ -19,6 +19,7 @@ below will direct you to the official documentation for these projects.- [eslint](https://eslint.org)- [mypy](http://mypy-lang.org/)+- [Prettier](https://prettier.io/)- [puppet](https://puppet.com/) (puppet provides its own mechanism forvalidating manifests)- [pyflakes](https://pypi.python.org/pypi/pyflakes)@@ -100,6 +101,7 @@ following checks:- Check Python code with pyflakes.- Check JavaScript and TypeScript code with eslint.+- Check JavaScript, TypeScript, and YAML formatting with Prettier.- Check Python code for custom Zulip rules.- Check non-Python code for custom Zulip rules.- Check puppet manifests with the puppet validator.@@ -184,6 +186,7 @@ that we exempt may be deemed not worthwhile to fix.We check our JavaScript code in a few different ways:- We run eslint.+- We check code formatting with Prettier.- We perform custom Zulip regex checks on the code.#### Puppet manifests