summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-10-26 22:22:31 +0300
committerDerick Montague <derick.montague@ibm.com>2020-10-27 16:19:12 +0300
commit736f2a4b3c5569f3e2644525845245477e7ba2ff (patch)
tree528356317d2d63aae6f1a2138fc3766978b7978c /docs
parent459c1edb1fe996f1d73545501897a2e8c67fded9 (diff)
downloadwebui-vue-736f2a4b3c5569f3e2644525845245477e7ba2ff.tar.xz
Add coding standards overview page
Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I2dd0fb44a78da62864442fd633654a3e4f887184
Diffstat (limited to 'docs')
-rw-r--r--docs/.vuepress/config.js1
-rw-r--r--docs/guide/coding-standards/readme.md23
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index e2e413da..987a846c 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -28,6 +28,7 @@ module.exports = {
{
title: "Coding Standards",
children: [
+ ["/guide/coding-standards/", "Overview"],
["/guide/coding-standards/accessibility", "Accessibility"],
["/guide/coding-standards/sass", "SASS"],
["/guide/coding-standards/javascript", "JavaScript"]
diff --git a/docs/guide/coding-standards/readme.md b/docs/guide/coding-standards/readme.md
new file mode 100644
index 00000000..dae3a8ad
--- /dev/null
+++ b/docs/guide/coding-standards/readme.md
@@ -0,0 +1,23 @@
+# Overview
+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)
+- [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 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