summaryrefslogtreecommitdiff
path: root/docs/guide/coding-standards/readme.md
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-12-08 15:13:13 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-12-08 15:13:13 +0300
commit7385e139b0c9efca7430458cee982e63e282f4ae (patch)
tree1bbdb0164e556b76eec72cb558c66974c8f95dd8 /docs/guide/coding-standards/readme.md
parentb24a483eda5ca0b0ecdb4f0c61b90d76d0d8e1e0 (diff)
downloadwebui-vue-7385e139b0c9efca7430458cee982e63e282f4ae.tar.xz
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository. Change-Id: I2804ee3ab5ff6bcbf986b028db2fafec8e616779 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'docs/guide/coding-standards/readme.md')
-rw-r--r--docs/guide/coding-standards/readme.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/guide/coding-standards/readme.md b/docs/guide/coding-standards/readme.md
index a6ab3669..48d6cfc7 100644
--- a/docs/guide/coding-standards/readme.md
+++ b/docs/guide/coding-standards/readme.md
@@ -1,31 +1,36 @@
# JavaScript and SASS
+
This project uses the following libraries to determine the best practices and
guidelines for both SCSS and JavaScript syntax.
+
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [ESLint Plugin for Vue](https://eslint.vuejs.org/)
The guidelines we are following are:
-- [Vue
- Recommended](https://eslint.vuejs.org/rules/#priority-c-recommended-minimizing-arbitrary-choices-and-cognitive-overhead-for-vue-js-3-x)
+
+- [Vue Recommended](https://eslint.vuejs.org/rules/#priority-c-recommended-minimizing-arbitrary-choices-and-cognitive-overhead-for-vue-js-3-x)
- [ESLint Recommended](https://eslint.org/docs/rules/)
- [Prettier](https://prettier.io/docs/en/options.html)
The rules are applied in the following order:
+
1. Vue rules
1. ESLint recommended
1. Prettier
## Overrides
+
Any overrides to a rule are located in the ESLint configuration file,
`.eslintrc.js`, located in the root directory.
## Running the lint test
+
To test all files for linting, run `npm run lint`. This command will evaluate
the syntax of all files and update any code that that does not require manual
review.
-The linting script runs when code is committed, during pre-commit, and when the
+The linting script runs when code is committed, during pre-commit, and when the
CI tool runs after a push to Gerrit. There is a shell script named
`format-code.sh` that installs node package dependencies and runs the test
-script in your CI. \ No newline at end of file
+script in your CI.