diff --git a/developer/contributing.rst b/developer/contributing.rst index b55bd08a..5c9798d2 100644 --- a/developer/contributing.rst +++ b/developer/contributing.rst @@ -220,27 +220,38 @@ conventions which can be enforced by using the following tools: `_), for more info consult the documentation of :doc:`openwisp-qa-check `. -Keep in mind that the QA checks defined in the ``run-qa-checks`` script -are also executed in the CI builds, which will fail if any QA check fails. +.. important:: + + QA checks defined in the ``run-qa-checks`` script are also executed in + CI builds. These builds will fail if any QA check fails. -To fix QA check failures, run ``openwisp-qa-format`` and apply manual -fixes if needed until ``./run-qa-checks`` runs without errors. + To resolve QA check failures, run ``openwisp-qa-format`` and apply + manual fixes if necessary, until ``./run-qa-checks`` completes without + errors. .. note:: If you want to learn more about our usage of python and django, we suggest reading :doc:`../developer/hacking-openwisp-python-django`. -2. Javascript code conventions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +2. CSS and Javascript code conventions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +OpenWISP follows CSS and JavaScript coding conventions enforced by the +`Prettier `_ code formatting tool. + +The Prettier formatter is used by the :doc:`openwisp-qa-format +` tool and by the `./run-qa-checks` script +located in the top-level directory of each repository. + +.. important:: + + QA checks defined in the ``run-qa-checks`` script are also executed in + CI builds. These builds will fail if any QA check fails. -- OpenWISP follows standard JavaScript coding style conventions that are - generally accepted or the ones that are specified in `.jshintrc files - `_; - find out more about `JSHint here `_ -- please follow this `JavaScript Style Guide and Coding Conventions - `_ link for proper - explanation and wonderful examples + To resolve QA check failures, run ``openwisp-qa-format`` and apply + manual fixes if necessary, until ``./run-qa-checks`` completes without + errors. 3. OpenWrt related conventions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~