Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5ebb296

Browse files
Merge pull request #210 from davellanedam/development
Development
2 parents 3f151ae + c0d58d5 commit 5ebb296

File tree

135 files changed

+11026
-4992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+11026
-4992
lines changed

‎.eslintrc.json

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
{
2+
"parser": "babel-eslint",
3+
24
"env": {
35
"node": true,
4-
"mocha": true
5-
},
6-
7-
"parserOptions": {
8-
"ecmaVersion": 9
6+
"mocha": true,
7+
"es6": true
98
},
109

1110
"globals": {
1211
"Promise": true,
1312
"_": true,
14-
"async": true
13+
"async": true,
14+
"expect": true,
15+
"jest": true
1516
},
1617

1718
"rules": {
1819
"callback-return": [
19-
"error", ["done", "proceed", "next", "onwards", "callback", "cb"]
20+
"error",
21+
["done", "proceed", "next", "onwards", "callback", "cb"]
22+
],
23+
"camelcase": [
24+
"warn",
25+
{
26+
"properties": "always"
27+
}
2028
],
21-
"camelcase": ["warn", {
22-
"properties": "always"
23-
}],
2429
"comma-style": ["warn", "last"],
2530
"curly": ["error"],
2631
"eqeqeq": ["error", "always"],
@@ -48,20 +53,26 @@
4853
"new-cap": ["off"],
4954
"consistent-this": ["error", "that"],
5055
"no-unused-vars": [
51-
"warn",
56+
"error",
5257
{
5358
"caughtErrors": "all",
5459
"caughtErrorsIgnorePattern": "^unused($|[A-Z].*$)"
5560
}
5661
],
57-
"no-use-before-define": ["error", {
58-
"functions": false
59-
}],
62+
"no-use-before-define": [
63+
"error",
64+
{
65+
"functions": false
66+
}
67+
],
6068
"no-var": 2,
6169
"one-var": ["warn", "never"],
62-
"prefer-arrow-callback": ["warn", {
63-
"allowNamedFunctions": true
64-
}],
70+
"prefer-arrow-callback": [
71+
"warn",
72+
{
73+
"allowNamedFunctions": true
74+
}
75+
],
6576
"quotes": [
6677
"warn",
6778
"single",
@@ -70,17 +81,19 @@
7081
"allowTemplateLiterals": true
7182
}
7283
],
73-
"semi": ["error", "never"],
74-
"semi-spacing": ["warn", {
75-
"before": false,
76-
"after": true
77-
}],
84+
"semi-spacing": [
85+
"warn",
86+
{
87+
"before": false,
88+
"after": true
89+
}
90+
],
7891
"semi-style": ["warn", "last"],
7992
"space-before-function-paren": ["off", 2],
8093
"prettier/prettier": "error"
8194
},
8295
"extends": [
83-
"formidable/rules/eslint/best-practices/on",
96+
"formidable/rules/eslint/best-practices/off",
8497
"formidable/rules/eslint/es6/on",
8598
"formidable/rules/eslint/errors/off",
8699
"formidable/rules/eslint/strict/on",
@@ -89,7 +102,5 @@
89102
"formidable/rules/eslint/variables/on",
90103
"prettier"
91104
],
92-
"plugins": [
93-
"prettier"
94-
]
105+
"plugins": ["prettier"]
95106
}

‎.vscode/launch.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Launch nodemon in debug",
6+
"type": "node",
7+
"request": "launch",
8+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/nodemon",
9+
"program": "${workspaceFolder}/server.js",
10+
"restart": true,
11+
"protocol": "inspector",
12+
"console": "integratedTerminal",
13+
"internalConsoleOptions": "neverOpen",
14+
"port": 9230
15+
},
16+
{
17+
"name": "Launch mocha test in debug",
18+
"request": "launch",
19+
"runtimeArgs": ["run", "mocha", "${relativeFile}"],
20+
"runtimeExecutable": "npm",
21+
"skipFiles": ["<node_internals>/**"],
22+
"type": "node",
23+
"env": {
24+
"PORT": "3111"
25+
}
26+
},
27+
{
28+
"name": "Launch jest in debug",
29+
"type": "node",
30+
"request": "launch",
31+
"cwd": "${workspaceFolder}",
32+
"runtimeArgs": [
33+
"--inspect-brk",
34+
"node_modules/.bin/jest",
35+
"--runInBand",
36+
"--config=jest.config.js",
37+
"${file}"
38+
],
39+
"port": 9231
40+
}
41+
]
42+
}

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## v9.0.0 (October 3, 2020)
2+
3+
- Major breaking changes, now controllers and middleware is split in single files for more scalability and testability
4+
- Added Jest setup
5+
- Added first Jest test
6+
- Added VS Code setup for debugging Jest and nodemon
7+
- Added more reports for coverage, now there are three: 1 for Jest tests, 1 for mocha tests (end to end) and a 3rd that merges the previous 2.
8+
- NPM updated
9+
110
## v8.1.5 (July 30, 2020)
211

312
- NPM updated

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ If you need to add more routes to the project just create a new file in `/app/ro
224224

225225
### Creating new controllers
226226

227-
When you create a new controller file, try to also create another file with validations. Ex. `countries.js`and `countries.validate.js`. An example of this is included in the repository.
227+
When you create a new controller, try to also create another folder with validations and helpers. Ex. `/countries`, `/countries/validators`and `/countries/helpers`. An example of this is included in the repository.
228228

229229
## Bugs or improvements
230230

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /