Skip to content
Permalink
Browse files
adding config files according to Marks template
  • Loading branch information
reisborw committed Oct 16, 2019
1 parent 6e4a85a commit c1f7d9e456f4244307e11e32e7ddcf95e6809b67
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 29 deletions.
@@ -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"
]
}
}
"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"
}
}]
}
@@ -27,4 +27,7 @@ website.db
.vscode

# Env variables
.env
.env

# Database
*.db
@@ -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
}

BIN -24 KB faq.db
Binary file not shown.
@@ -0,0 +1,19 @@
'use strict'

module.exports = {
displayName: 'test',
verbose: true,
collectCoverage: true,
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0
}
},
testPathIgnorePatterns: [
'/node_modules/',
'/__tests__/fixtures/',
]
}
@@ -0,0 +1,21 @@
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"source": {
"include": [ "." ],
"exclude": [ "node_modules" ],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": ["jsdoc-route-plugin"],
"templates": {
"cleverLinks": false,
"monospaceLinks": false
},
"opts": {
"destination": "docs/jsdoc",
"recurse": true
}
}
@@ -2,22 +2,55 @@
"name": "faq",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "server.js",
"engines": {
"node": "12.x"
},
"scripts": {
"lint": "eslint ./",
"start": "nodemon server.js"
"start": "nodemon server.js",
"acceptance": "jest --coverage --detectOpenHandles",
"jsdoc": "node_modules/.bin/jsdoc -c jsdoc.conf",
"linter": "node_modules/.bin/eslint .",
"test": "jest --coverage --detectOpenHandles",
"unit": "node_modules/.bin/jest --coverage --runInBand tests/unit/"
},
"jest": {
"projects": [
"<rootDir>/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"
}
}

0 comments on commit c1f7d9e

Please sign in to comment.