@anthonylzq/simba.js 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/lib/src/functions/eslint.js +49 -49
- package/lib/src/functions/express.js +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,8 +138,6 @@ Regardless of the option chosen, a new folder will be generated with the name of
|
|
|
138
138
|
┃ ┃ ┗ 📜index.ts
|
|
139
139
|
┃ ┣ 📜index.ts
|
|
140
140
|
┃ ┗ 📜user.ts
|
|
141
|
-
┣ 📂test
|
|
142
|
-
┃ ┗ 📜test.http
|
|
143
141
|
┣ 📂utils
|
|
144
142
|
┃ ┣ 📜docs.json
|
|
145
143
|
┃ ┗ 📜index.ts
|
|
@@ -155,6 +153,7 @@ Regardless of the option chosen, a new folder will be generated with the name of
|
|
|
155
153
|
📜nodemon.json
|
|
156
154
|
📜package.json
|
|
157
155
|
📜README.md
|
|
156
|
+
📜index.http
|
|
158
157
|
📜tsconfig.base.json
|
|
159
158
|
📜tsconfig.json
|
|
160
159
|
📜webpack.config.js
|
|
@@ -6,71 +6,71 @@ const writeFile = require('../utils/writeFile')
|
|
|
6
6
|
*/
|
|
7
7
|
module.exports = async projectName => {
|
|
8
8
|
const data = {
|
|
9
|
-
eslintContent: `
|
|
10
|
-
env: {
|
|
11
|
-
node: true
|
|
9
|
+
eslintContent: `{
|
|
10
|
+
"env": {
|
|
11
|
+
"node": true
|
|
12
12
|
},
|
|
13
|
-
root: true,
|
|
14
|
-
parser:
|
|
15
|
-
plugins: [
|
|
16
|
-
extends: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
"root": true,
|
|
14
|
+
"parser": "@typescript-eslint/parser",
|
|
15
|
+
"plugins": ["@typescript-eslint", "import", "prettier"],
|
|
16
|
+
"extends": [
|
|
17
|
+
"standard",
|
|
18
|
+
"eslint:recommended",
|
|
19
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
20
|
+
"plugin:@typescript-eslint/recommended",
|
|
21
|
+
"prettier"
|
|
22
22
|
],
|
|
23
|
-
rules: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
"rules": {
|
|
24
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
25
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
26
|
+
"arrow-parens": ["error", "as-needed"],
|
|
27
|
+
"import/extensions": [
|
|
28
28
|
2,
|
|
29
29
|
{
|
|
30
|
-
ts:
|
|
31
|
-
js:
|
|
32
|
-
json:
|
|
30
|
+
"ts": "never",
|
|
31
|
+
"js": "always",
|
|
32
|
+
"json": "always"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
"import/no-extraneous-dependencies": [
|
|
36
|
+
"error",
|
|
37
37
|
{
|
|
38
|
-
devDependencies: [
|
|
39
|
-
optionalDependencies: [
|
|
40
|
-
peerDependencies: [
|
|
38
|
+
"devDependencies": ["**/*.test.js", "webpack.config.js"],
|
|
39
|
+
"optionalDependencies": ["**/*.test.js"],
|
|
40
|
+
"peerDependencies": ["**/*.test.js"]
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
"max-len": [
|
|
44
|
+
"error",
|
|
45
45
|
{
|
|
46
|
-
code: 80,
|
|
47
|
-
ignoreComments: true,
|
|
48
|
-
ignoreRegExpLiterals: true,
|
|
49
|
-
ignoreTemplateLiterals: true,
|
|
50
|
-
ignoreTrailingComments: true,
|
|
51
|
-
ignoreStrings: true,
|
|
52
|
-
ignoreUrls: true
|
|
46
|
+
"code": 80,
|
|
47
|
+
"ignoreComments": true,
|
|
48
|
+
"ignoreRegExpLiterals": true,
|
|
49
|
+
"ignoreTemplateLiterals": true,
|
|
50
|
+
"ignoreTrailingComments": true,
|
|
51
|
+
"ignoreStrings": true,
|
|
52
|
+
"ignoreUrls": true
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
"newline-before-return": "error",
|
|
56
|
+
"object-curly-spacing": ["error", "always"],
|
|
57
57
|
"object-shorthand": ["error", "always"],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
"prefer-const": "error",
|
|
59
|
+
"prettier/prettier": [
|
|
60
|
+
"error",
|
|
61
61
|
{
|
|
62
|
-
arrowParens:
|
|
63
|
-
bracketSpacing: true,
|
|
64
|
-
printWidth: 80,
|
|
65
|
-
quoteProps:
|
|
66
|
-
semi: false,
|
|
67
|
-
singleQuote: true,
|
|
68
|
-
tabWidth: 2,
|
|
69
|
-
trailingComma:
|
|
62
|
+
"arrowParens": "avoid",
|
|
63
|
+
"bracketSpacing": true,
|
|
64
|
+
"printWidth": 80,
|
|
65
|
+
"quoteProps": "as-needed",
|
|
66
|
+
"semi": false,
|
|
67
|
+
"singleQuote": true,
|
|
68
|
+
"tabWidth": 2,
|
|
69
|
+
"trailingComma": "none"
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
|
-
radix: [
|
|
73
|
-
|
|
72
|
+
"radix": ["error", "as-needed"],
|
|
73
|
+
"spaced-comment": ["error", "always"]
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
`,
|
|
@@ -41,13 +41,12 @@ const writeFile = require('../utils/writeFile')
|
|
|
41
41
|
* | | |- index: content, file
|
|
42
42
|
* | |- user: content, file
|
|
43
43
|
* | |- index: content, file
|
|
44
|
-
* |- test:
|
|
45
|
-
* | |- index.http: content, file
|
|
46
44
|
* |- utils:
|
|
47
45
|
* | |- docs.json: content, file
|
|
48
46
|
* | |- index: content, file
|
|
49
47
|
* |- .env: content, file
|
|
50
48
|
* |- index: content, file
|
|
49
|
+
* index.http: content, file
|
|
51
50
|
*/
|
|
52
51
|
|
|
53
52
|
/**
|
|
@@ -778,7 +777,7 @@ Content-Type: application/json
|
|
|
778
777
|
### Testing delete user
|
|
779
778
|
DELETE http://localhost:1996/api/user/60e7e3b93b01c1a7aa74cd6b
|
|
780
779
|
`,
|
|
781
|
-
file: `${projectName}/
|
|
780
|
+
file: `${projectName}/index.http`
|
|
782
781
|
}
|
|
783
782
|
},
|
|
784
783
|
utils: {
|