From c1f7d9e456f4244307e11e32e7ddcf95e6809b67 Mon Sep 17 00:00:00 2001 From: Wallef Reis Borges Date: Wed, 16 Oct 2019 14:02:37 +0100 Subject: [PATCH] adding config files according to Marks template --- .eslintrc.json | 87 ++++++++++++++++++++++++++++++++++---------- .gitignore | 5 ++- .markdownlint.json | 33 +++++++++++++++++ faq.db | Bin 24576 -> 0 bytes jest-test.config.js | 19 ++++++++++ jsdoc.conf | 21 +++++++++++ package.json | 49 +++++++++++++++++++++---- 7 files changed, 185 insertions(+), 29 deletions(-) create mode 100644 .markdownlint.json delete mode 100644 faq.db create mode 100644 jest-test.config.js create mode 100644 jsdoc.conf diff --git a/.eslintrc.json b/.eslintrc.json index 1c51996..7e9640b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,26 +1,73 @@ { "env": { - "browser": true, - "commonjs": true, - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" + "es6": true, + "jasmine": true, + "node": true, + "browser": true, + "jest": true }, "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 8 }, "rules": { - "indent": [ - "error", - 4 - ], - "semi": [ - "error", - "always" - ] - } -} \ No newline at end of file + "arrow-body-style": 2, + "arrow-spacing": ["warn", {"before": true, "after": true}], + "brace-style": 2, + "camelcase": [2, {"properties": "never"}], + "complexity": ["error", 5], + "eol-last": "warn", + "eqeqeq": "error", + "func-call-spacing": ["error", "never"], + "global-require": "error", + "handle-callback-err": "warn", + "indent": [1, "tab", {"SwitchCase": 1}], + "key-spacing": ["error", {"beforeColon": false, "afterColon": true}], + "linebreak-style": ["warn", "unix"], + "max-depth": ["error", 3], + "max-len": ["warn", { "code": 120, "tabWidth": 4 }], + "max-lines": ["warn", 150], + "max-lines-per-function": ["error", 20], + "max-nested-callbacks": ["error", 4], + "max-params": ["error", 5], + "max-statements": ["error", 20], + "no-cond-assign": 2, + "no-dupe-args": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "warn", + "no-empty-function": 2, + "no-multiple-empty-lines": "warn", + "no-extra-parens": 2, + "no-func-assign": 2, + "no-irregular-whitespace": 2, + "no-magic-numbers": [1, {"ignore": [-1, 0, 1]}], + "no-multi-spaces": 1, + "no-multi-str": 1, + "no-unexpected-multiline": 2, + "no-unreachable": 2, + "no-self-assign": 2, + "no-trailing-spaces": 1, + "no-undef": 2, + "no-unused-vars": 1, + "no-var": 2, + "prefer-arrow-callback": 1, + "prefer-const": 2, + "prefer-template": "error", + "quotes": [1, "single"], + "semi": [1, "never"], + "space-before-blocks": ["error", { "functions": "always", "keywords": "always", "classes": "always" }], + "space-before-function-paren": [2, "never"], + "strict": [2, "global"], + "yoda": 2 + }, + "overrides": [{ + "files": [ "*.test.js", "*.spec.js", "sqlite-async.js" ], + "rules": { + "global-require": "off", + "max-lines-per-function": "off", + "max-lines": "off", + "max-statements": "off", + "no-magic-numbers": "off" + } + }] + } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 40ca3c5..c73fb45 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,7 @@ website.db .vscode # Env variables -.env \ No newline at end of file +.env + +# Database +*.db \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..3164d3d --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,33 @@ +{ + "line-length": false, + "no-inline-html": { + "allowed_elements": [ + "a", "br" + ] + }, + "header-increment": true, + "ul-style": { + "style": "dash" + }, + "ul-start-left": true, + "no-trailing-spaces": { + "br_spaces": 0 + }, + "no-hard-tabs": true, + "no-reversed-links": true, + "no-multiple-blanks": true, + "no-missing-space-atx": true, + "no-multiple-space-atx": true, + "blanks-around-headers": true, + "header-start-left": true, + "no-duplicate-header": true, + "single-h1": true, + "blanks-around-fences": true, + "blanks-around-lists": true, + "no-bare-urls": true, + "no-space-in-emphasis": true, + "no-space-in-code": true, + "no-space-in-links": true, + "fenced-code-language": true + } + \ No newline at end of file diff --git a/faq.db b/faq.db deleted file mode 100644 index 741b8ca0f7b004c989dfe03cebf6a7848e4a8ed9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24576 zcmeI&?QhaR90%~0O-9)Ri!ba85;^M&VOz|I@r`d3=dlo3nO!mR!ZaOprU}rl*SXh< z*}vy2{{-iI{{rvIgX>^hBurxblH6GD?spHL8wydmX6z!%kltTal5P$## zAOL}R3ao6%Kh$DTK4YPM*ml@)`_KxVj&DVmR`Kb0&f<1CA?ZM=d;@@YkL zTbfeQO}a}BqSs8K*Q-^sZ&db5MuWVj4N|I`wTjLg+oQU<#Uok{YX+_#x?WdPO!|(; z4B|v-V26&T@UE-k%4Js53j(JZ{_f=!Etl$5lWY$vct=N}=ey0TYq(w84?I6`qqc{m zjkVL_MV9Ze(BbnL8`KGN0&CJt#So599401nRfTfRpp{)+VB}+!3&fyhYEXTL9*|K9 z)A9nfz?+Um4#yCW61l^Obm8;;wIwx|lfNuS>pC168~u}vFX||N+O-Vbu+5ii4D9+f zc02ZmL6iWT-u{n)_#XVOX0!6yg9ym(vQzFic)Rq8ALLF;b3MUqKIXl~y`^YdzrVPx zdpkT=OtPQ*uTL_*+y9%ryq`#_o11cDxU&2kuEiX_W4ldpeqX#?i0$f2h54@CakhA5 z;nQ1rNmW(3*FPPiqa*s0h{bFDGiA!tUGz5LKyW&?+n$i`+l-xh!K6di{%D7G(2o(v z1mkxC-t^e/jest-test.config.js" + ] }, - "keywords": [], "author": "", "license": "ISC", "dependencies": { - "dotenv": "^8.1.0", - "koa": "^2.8.2", + "bcrypt": "^3.0.6", + "bcrypt-promise": "^2.0.0", + "dotenv": "^8.2.0", + "fs-extra": "^7.0.1", + "handlebars": "^4.4.2", + "koa": "^2.10.0", + "koa-body": "^4.0.8", + "koa-bodyparser": "^4.2.1", "koa-router": "^7.4.0", + "koa-session": "^5.10.1", + "koa-static": "^5.0.0", + "koa-views": "^6.1.5", + "markdown": "^0.5.0", + "markdownlint-cli": "^0.18.0", + "mime-types": "^2.1.22", + "remark-cli": "^7.0.0", + "remark-lint": "^6.0.5", + "remark-preset-lint-markdown-style-guide": "^2.1.3", + "remark-preset-lint-recommended": "^3.0.3", "sqlite-async": "^1.0.12" }, "devDependencies": { - "eslint": "^6.5.1", - "nodemon": "^1.19.3" + "eslint": "^5.15.2", + "handlebars-validate": "^0.1.2", + "http-status-codes": "^1.3.2", + "jest": "^24.1.0", + "jsdoc": "^3.6.3", + "jsdoc-route-plugin": "^0.1.0", + "markdownlint": "^0.17.0", + "nodemon": "^1.19.4" } }