@anthonylzq/simba.js 1.6.0 → 1.9.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,47 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.9.1](https://github.com/AnthonyLzq/simba.js/compare/v1.9.0...v1.9.1) (2021-12-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * updated packages in example folder and .eslint rules ([b7bed74](https://github.com/AnthonyLzq/simba.js/commit/b7bed74fcd58f89abdffb7a06f87e4d808059af8))
11
+
12
+ ## [1.9.0](https://github.com/AnthonyLzq/simba.js/compare/v1.8.0...v1.9.0) (2021-12-13)
13
+
14
+
15
+ ### Features
16
+
17
+ * updated packages and example folder to include license and heroku config ([7267e7a](https://github.com/AnthonyLzq/simba.js/commit/7267e7ab40bf7333d566d7e90d85ad4f4357b731))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * linted eslint.js file ([a47ea79](https://github.com/AnthonyLzq/simba.js/commit/a47ea795e2f6cf4363bd82ed05fc2c31b4fa8a26))
23
+
24
+ ## [1.8.0](https://github.com/AnthonyLzq/simba.js/compare/v1.7.0...v1.8.0) (2021-12-13)
25
+
26
+
27
+ ### Features
28
+
29
+ * implemented baseUrl config with ts and webpack to avoid "../../.. ..." ([9b9e9d2](https://github.com/AnthonyLzq/simba.js/commit/9b9e9d20cae8b4bbdaef58364220512514dac1a4))
30
+ * updated docker file and ignored git folder to be generated manually by docker ([33c1b0d](https://github.com/AnthonyLzq/simba.js/commit/33c1b0df9cfac4e686ece884aa3102e9ad49e6ab))
31
+ * updated docs ([ba72b64](https://github.com/AnthonyLzq/simba.js/commit/ba72b643ea45af7ce7dd7a9adaf8b4f27eacd266))
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * fixed eslint ignore ([1405884](https://github.com/AnthonyLzq/simba.js/commit/1405884ab10cf869d6811fbf588ba0b0efb04de2))
37
+ * fixed mongo connection ([57f8580](https://github.com/AnthonyLzq/simba.js/commit/57f85803701253be2308b1c45f537db5b59c92d4))
38
+
39
+ ## [1.7.0](https://github.com/AnthonyLzq/simba.js/compare/v1.6.0...v1.7.0) (2021-12-12)
40
+
41
+
42
+ ### Features
43
+
44
+ * updated docs and minor changes ([e6b32ca](https://github.com/AnthonyLzq/simba.js/commit/e6b32ca309603544e3506c9d18717f0e45ef0457))
45
+
5
46
  ## [1.6.0](https://github.com/AnthonyLzq/simba.js/compare/v1.5.0...v1.6.0) (2021-12-12)
6
47
 
7
48
 
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Simba.js
2
2
 
3
+ [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
+
3
5
  Set up a modern backend app by running one command. This project has the goal to create a complete setup for a backend application using `TypeScript` and `Express`. It will create many files that are usually created manually. Currently the following files are being created:
4
6
 
5
7
  - `.env`
@@ -59,14 +61,14 @@ simba -h
59
61
  This will generate the following output:
60
62
 
61
63
  ```bash
62
- Usage: npx simba [options] or simba [options] (if you it installed globally) or
63
- only simba if you want to be asked for the options one by one
64
+ simba [options] (if you it installed globally) or only simba if you want to be
65
+ asked for the options one by one
64
66
 
65
67
  Options:
66
- -a, --author Author of the project
67
- -e, --email Email of the author
68
68
  -N, --projectName Project name
69
69
  -D, --projectDescription Project description
70
+ -a, --author Author of the project
71
+ -e, --email Email of the author
70
72
  -H, --heroku Whether or not the project will be deployed using
71
73
  Heroku [boolean] [default: false]
72
74
  -l, --license Type of license for the project, it can be one of:
@@ -84,8 +86,8 @@ Options:
84
86
  -h, --help Show help [boolean]
85
87
 
86
88
  Examples:
87
- simba -a Anthony -e sluzquinosa@uni.pe -N "Project Name" -D "Project
88
- description"
89
+ simba -N "Project Name" -D "Project description -a Anthony -e
90
+ sluzquinosa@uni.pe"
89
91
 
90
92
  Developed by AnthonyLzq
91
93
  ```
@@ -139,28 +141,28 @@ Regardless of the option chosen, a new folder will be generated with the name of
139
141
  Let's suppose you want to build a project that will be deployed to Heroku, so should run:
140
142
 
141
143
  ```bash
142
- simba -a myName -e myEmail@email.com -N myProject -D 'This is a test' -H -l mit
144
+ simba -N myProject -D 'This is a test' -l mit -a myName -e myEmail@email.com -H
143
145
  ```
144
146
 
145
- Here we are specifying that we want to create a new project called `myProject` using the `MIT` license, and my name and my email are respectively: `myName` and `myEmail@email.com`.
147
+ Here we are specifying that we want to create a new project called `myProject` using the `MIT` license, my name and my email are respectively: `myName` and `myEmail@email.com` and I want to use heroku to deploy this server.
146
148
 
147
- As default, `yarn` is selected as package manager, but you don't want to use it, so you can pass the flag `-n` or `--npm` as follows:
149
+ As default, `yarn` is selected as package manager, but if you don't want to use it, you can pass the flag `-n` or `--npm` as follows:
148
150
 
149
151
  ```bash
150
- simba -a myName -e myEmail@email.com -N myProject -D 'This is a test' -H -l mit -n
152
+ simba -N myProject -D 'This is a test' -l mit -a myName -e myEmail@email.com -H -n
151
153
  ```
152
154
 
153
155
  Finally, you may not want to use a license or one of the available licenses, don't worry, just don't pass the flag `-l` neither `--license` as follows:
154
156
 
155
157
  ```bash
156
- simba -a myName -e myEmail@email.com -N myProject -D 'This is a test' -H
158
+ simba -N myProject -D 'This is a test' -a myName -e myEmail@email.com -H
157
159
  ```
158
160
 
159
161
  ### Some considerations
160
162
 
161
163
  - This project is based in other project from my own, [`typescript-project-generator`](https://www.npmjs.com/package/typescript-project-generator), but only considering the `express-mongoose-node` part.
162
- - You are able to run a server that has one main route, `home` (`/`), and another one, `user` (`/user` or `/user/:userId`).
163
- - To connect your server with your `MongoDB` database, you need to provide your `uri` in the `.env`. By default, we will try to connect to a local database. The content of the `.env` file is:
164
+ - You are able to run a server that has one main route, `home` (`/`), `user` (`api/user` or `api/user/:userId`) and `docs` (`api/docs`).
165
+ - To connect your server with your `MongoDB` database, you need to provide your `uri` in the `.env`. By default, Simba will try to connect to a local database. The content of the `.env` file is:
164
166
 
165
167
  ```bash
166
168
  MONGO_URI = mongodb://mongo:mongo@mongo:27017/${projectName}
@@ -190,6 +192,7 @@ simba -a myName -e myEmail@email.com -N myProject -D 'This is a test' -H
190
192
  - To check the content of the files generated, please check the `example` folder.
191
193
  - If you provide a project name that contains spaces, something like 'My awesome Project', every space will be replaced with a hyphen. So at the end your project name will be 'My-awesome-project', but in its README.md file, the hyphens will be removed and the project name will be parsed to title case (My Awesome Project).
192
194
  - Finally, `git` will be initialized and a list of libraries will be installed. Check the [**notes**](#notes).
195
+ - Relative imports is already configured, you do not need to import a file using `../../../some/very/nested/stuff/in/other/folder`, you can use `some/very/nested/stuff/in/other/folder` assuming that your folder is under the `src` folder.
193
196
 
194
197
  ## What is new?
195
198
 
@@ -208,8 +211,8 @@ Here is the list of the packages that are being installed, as `devDependencies`:
208
211
  - [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser)
209
212
  - [`dotenv`](https://www.npmjs.com/package/dotenv)
210
213
  - [`eslint`](https://www.npmjs.com/package/eslint)
211
- - [`eslint-config-airbnb-typescript`](https://www.npmjs.com/package/eslint-config-airbnb-typescript)
212
214
  - [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier)
215
+ - [`eslint-config-standard`](https://www.npmjs.com/package/eslint-config-standard)
213
216
  - [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import)
214
217
  - [`eslint-plugin-prettier`](https://www.npmjs.com/package/eslint-plugin-prettier)
215
218
  - [`eslint-plugin-sort-keys-fix`](https://www.npmjs.com/package/eslint-plugin-sort-keys-fix)
@@ -219,6 +222,8 @@ Here is the list of the packages that are being installed, as `devDependencies`:
219
222
  - [`standard-version`](https://www.npmjs.com/package/standard-version)
220
223
  - [`ts-loader`](https://www.npmjs.com/package/ts-loader)
221
224
  - [`ts-node`](https://www.npmjs.com/package/ts-node)
225
+ - [`tsconfig-paths`](https://www.npmjs.com/package/tsconfig-paths)
226
+ - [`tsconfig-paths-webpack-plugin`](https://www.npmjs.com/package/tsconfig-paths-webpack-plugin)
222
227
  - [`typescript`](https://www.npmjs.com/package/typescript)
223
228
  - [`webpack`](https://www.npmjs.com/package/webpack)
224
229
  - [`webpack-cli`](https://www.npmjs.com/package/webpack-cli)
package/lib/index.js CHANGED
@@ -7,24 +7,25 @@ const installation = require('./src/installation')
7
7
  const CURRENT_YEAR = `${new Date().getFullYear()}`
8
8
  const argv = yargs(hideBin(process.argv))
9
9
  .version(false)
10
+ // Pending to test it using npx
10
11
  .usage(
11
- 'Usage: npx simba [options] or simba [options] (if you it installed globally) or only simba if you want to be asked for the options one by one'
12
+ 'simba [options] (if you it installed globally) or only simba if you want to be asked for the options one by one'
12
13
  )
13
14
  .example(
14
- 'simba -a Anthony -e sluzquinosa@uni.pe -N "Project Name" -D "Project description"'
15
+ 'simba -N "Project Name" -D "Project description -a Anthony -e sluzquinosa@uni.pe"'
15
16
  )
16
- .alias('a', 'author')
17
- .nargs('a', 1)
18
- .describe('a', 'Author of the project')
19
- .alias('e', 'email')
20
- .nargs('e', 1)
21
- .describe('e', 'Email of the author')
22
17
  .alias('N', 'projectName')
23
18
  .nargs('N', 1)
24
19
  .describe('N', 'Project name')
25
20
  .alias('D', 'projectDescription')
26
21
  .nargs('D', 1)
27
22
  .describe('D', 'Project description')
23
+ .alias('a', 'author')
24
+ .nargs('a', 1)
25
+ .describe('a', 'Author of the project')
26
+ .alias('e', 'email')
27
+ .nargs('e', 1)
28
+ .describe('e', 'Email of the author')
28
29
  .alias('H', 'heroku')
29
30
  .describe('H', 'Whether or not the project will be deployed using Heroku')
30
31
  .alias('l', 'license')
@@ -45,6 +46,7 @@ const argv = yargs(hideBin(process.argv))
45
46
  .nargs('f', 1)
46
47
  .describe('f', 'Main file of the project')
47
48
  .alias('q', 'questions')
49
+ .nargs('q', 1)
48
50
  .describe(
49
51
  'q',
50
52
  'Whether or not you want to be asked to answer the questions related to the project one by one'
@@ -14,6 +14,12 @@ COPY package.json ./
14
14
 
15
15
  RUN yarn install --prod
16
16
 
17
+ RUN yarn add webpack webpack-node-externals -D
18
+
19
+ RUN yarn build
20
+
21
+ RUN yarn remove webpack webpack-node-externals
22
+
17
23
  COPY dist /app/dist
18
24
 
19
25
  CMD [ "yarn", "start" ]
@@ -12,11 +12,7 @@ module.exports = async projectName => {
12
12
  },
13
13
  root: true,
14
14
  parser: '@typescript-eslint/parser',
15
- plugins: [
16
- '@typescript-eslint',
17
- 'import',
18
- 'prettier'
19
- ],
15
+ plugins: ['@typescript-eslint', 'import', 'prettier'],
20
16
  extends: [
21
17
  'standard',
22
18
  'eslint:recommended',
@@ -27,10 +23,7 @@ module.exports = async projectName => {
27
23
  rules: {
28
24
  '@typescript-eslint/no-var-requires': 'off',
29
25
  '@typescript-eslint/no-empty-interface': 'off',
30
- 'arrow-parens': [
31
- 'error',
32
- 'as-needed'
33
- ],
26
+ 'arrow-parens': ['error', 'as-needed'],
34
27
  'import/extensions': [
35
28
  2,
36
29
  {
@@ -60,37 +53,29 @@ module.exports = async projectName => {
60
53
  }
61
54
  ],
62
55
  'newline-before-return': 'error',
63
- 'object-curly-spacing': [
64
- 'error',
65
- 'always'
66
- ],
56
+ 'object-curly-spacing': ['error', 'always'],
57
+ "object-shorthand": ["error", "always"],
67
58
  'prefer-const': 'error',
68
59
  'prettier/prettier': [
69
60
  'error',
70
61
  {
71
- 'arrowParens': 'avoid',
72
- 'bracketSpacing': true,
73
- 'printWidth': 80,
74
- 'quoteProps': 'as-needed',
75
- 'semi': false,
76
- 'singleQuote': true,
77
- 'tabWidth': 2,
78
- 'trailingComma': 'none'
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'
79
70
  }
80
71
  ],
81
- radix: [
82
- 'error',
83
- 'as-needed'
84
- ],
72
+ radix: ['error', 'as-needed'],
85
73
  'spaced-comment': ['error', 'always']
86
74
  }
87
75
  }
88
76
  `,
89
77
  eslintFile: '.eslintrc.js',
90
- eslintIgnoreContent: `/dist
91
- .eslintrc.js
92
- webpack.config.js
93
- `,
78
+ eslintIgnoreContent: '/dist',
94
79
  eslintIgnoreFile: '.eslintignore'
95
80
  }
96
81
 
@@ -35,7 +35,6 @@ const writeFile = require('../utils/writeFile')
35
35
  * | |- index.http: content, file
36
36
  * |- utils:
37
37
  * | |- docs.json: content, file
38
- * | |- response: content, file
39
38
  * | |- index: content, file
40
39
  * |- .env: content, file
41
40
  * |- index: content, file
@@ -54,7 +53,7 @@ module.exports = async (projectName, projectVersion, email) => {
54
53
  import { IncomingHttpHeaders } from 'http'
55
54
  import { Request, Response } from 'express'
56
55
 
57
- import { DtoUser } from '../dto-interfaces'
56
+ import { DtoUser } from 'dto-interfaces'
58
57
 
59
58
  declare global {
60
59
  // This variable is global, so it will be available everywhere in the code
@@ -101,8 +100,8 @@ export { User }
101
100
  user: {
102
101
  content: `import httpErrors from 'http-errors'
103
102
 
104
- import { DtoUser } from '../dto-interfaces'
105
- import { IUser, UserModel } from '../models'
103
+ import { DtoUser } from 'dto-interfaces'
104
+ import { IUser, UserModel } from 'models'
106
105
  import { EFU, MFU, GE, errorHandling } from './utils'
107
106
 
108
107
  type Process = {
@@ -353,8 +352,8 @@ export { IUser, UserModel }
353
352
  import swaggerUi from 'swagger-ui-express'
354
353
  import httpErrors from 'http-errors'
355
354
 
356
- import { Home, User } from '../routes'
357
- import { docs } from '../utils'
355
+ import { Home, User } from 'routes'
356
+ import { docs } from 'utils'
358
357
 
359
358
  const routers = [User]
360
359
 
@@ -429,8 +428,6 @@ class Server {
429
428
  this._connection = mongoose.connection
430
429
  const connection = {
431
430
  keepAlive: true,
432
- useCreateIndex: true,
433
- useFindAndModify: false,
434
431
  useNewUrlParser: true,
435
432
  useUnifiedTopology: true
436
433
  }
@@ -467,9 +464,9 @@ class Server {
467
464
  })
468
465
 
469
466
  try {
470
- this._mongo()
467
+ this._mongo()
471
468
  } catch (e) {
472
- console.error(e)
469
+ console.error(e)
473
470
  }
474
471
  }
475
472
  }
@@ -516,9 +513,9 @@ export { Home, User }
516
513
  import httpErrors from 'http-errors'
517
514
  import { ValidationError } from 'joi'
518
515
 
519
- import { User as UserC } from '../controllers/user'
520
- import { DtoUser } from '../dto-interfaces'
521
- import { idSchema, userSchema } from '../schemas'
516
+ import { User as UserC } from 'controllers/user'
517
+ import { DtoUser } from 'dto-interfaces'
518
+ import { idSchema, userSchema } from 'schemas'
522
519
 
523
520
  const User = Router()
524
521
 
@@ -1148,22 +1145,6 @@ DELETE http://localhost:1996/api/user/60e7e3b93b01c1a7aa74cd6b
1148
1145
  export { docs }
1149
1146
  `,
1150
1147
  file: `${projectName}/src/utils/index.ts`
1151
- },
1152
- response: {
1153
- content: `import { Response } from 'express'
1154
-
1155
- const response = (
1156
- error: boolean,
1157
- message: unknown,
1158
- res: Response,
1159
- status: number
1160
- ): void => {
1161
- res.status(status).send({ error, message })
1162
- }
1163
-
1164
- export { response }
1165
- `,
1166
- file: `${projectName}/src/utils/response.ts`
1167
1148
  }
1168
1149
  },
1169
1150
  '.env': {
@@ -1249,7 +1230,6 @@ ${projectName}/src/utils
1249
1230
 
1250
1231
  // /utils
1251
1232
  await writeFile(data.utils.docs.file, data.utils.docs.content)
1252
- await writeFile(data.utils.response.file, data.utils.response.content)
1253
1233
  await writeFile(data.utils.index.file, data.utils.index.content)
1254
1234
 
1255
1235
  // .env
@@ -132,6 +132,8 @@ typings/
132
132
  # .pnp.*
133
133
 
134
134
  # End of https://www.toptal.com/developers/gitignore/api/node,yarn
135
+
136
+ dist
135
137
  `,
136
138
  gitignoreFile: '.gitignore'
137
139
  }
@@ -8,7 +8,8 @@ module.exports = async projectName => {
8
8
  const data = {
9
9
  tsconfigContent: `{
10
10
  "ts-node": {
11
- "files": true
11
+ "files": true,
12
+ "require": ["tsconfig-paths/register"]
12
13
  },
13
14
  "compilerOptions": {
14
15
  /* Visit https://aka.ms/tsconfig.json to read more about this file */
@@ -52,7 +53,7 @@ module.exports = async projectName => {
52
53
 
53
54
  /* Module Resolution Options */
54
55
  "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
55
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
56
+ "baseUrl": "./src", /* Base directory to resolve non-absolute module names. */
56
57
  // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
57
58
  // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
58
59
  // "typeRoots": [], /* List of folders to include type definitions from. */
@@ -8,6 +8,7 @@ module.exports = async projectName => {
8
8
  const data = {
9
9
  webpackContent: `const path = require('path')
10
10
  const nodeExternals = require('webpack-node-externals')
11
+ const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
11
12
 
12
13
  module.exports = {
13
14
  context: __dirname,
@@ -28,7 +29,12 @@ module.exports = {
28
29
  __dirname: false
29
30
  },
30
31
  resolve: {
31
- extensions: ['.ts', '.js']
32
+ extensions: ['.ts', '.js'],
33
+ plugins: [
34
+ new TsconfigPathsPlugin({
35
+ baseUrl: './src'
36
+ })
37
+ ]
32
38
  },
33
39
  output: {
34
40
  filename: 'index.js',
@@ -58,7 +58,11 @@ module.exports = async ({
58
58
 
59
59
  const prodPackages = `${manager} express mongoose morgan http-errors joi swagger-ui-express`
60
60
  const devPackages = `${manager} -D \
61
+ @types/express \
62
+ @types/http-errors \
63
+ @types/morgan \
61
64
  @types/node \
65
+ @types/swagger-ui-express \
62
66
  @typescript-eslint/eslint-plugin \
63
67
  @typescript-eslint/parser \
64
68
  dotenv \
@@ -71,17 +75,15 @@ eslint-plugin-sort-keys-fix \
71
75
  eslint-plugin-typescript-sort-keys \
72
76
  nodemon \
73
77
  prettier \
78
+ standard-version \
74
79
  ts-loader \
75
80
  ts-node \
81
+ tsconfig-paths \
82
+ tsconfig-paths-webpack-plugin \
76
83
  typescript \
77
84
  webpack \
78
85
  webpack-cli \
79
- webpack-node-externals \
80
- @types/express \
81
- @types/morgan \
82
- @types/swagger-ui-express \
83
- @types/http-errors \
84
- standard-version`
86
+ webpack-node-externals`
85
87
 
86
88
  bar.start(process, i)
87
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthonylzq/simba.js",
3
- "version": "1.6.0",
3
+ "version": "1.9.1",
4
4
  "description": "set up a modern backend app by running one command",
5
5
  "main": "lib/index.js",
6
6
  "directories": {
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "service": "node ./bin",
12
12
  "release": "standard-version",
13
- "test": "npm run rm && node ./bin -a AnthonyLzq -e sluzquinosa@uni.pe -N example -D 'This is a test'",
13
+ "test": "npm run rm && node ./bin -N example -D 'This is a test' -a AnthonyLzq -e sluzquinosa@uni.pe -l mit -H",
14
14
  "lint": "eslint --ext js lib/ --fix",
15
15
  "rm": "if [ -d \"example\" ]; then rm -rf example; fi"
16
16
  },
@@ -37,7 +37,7 @@
37
37
  "yargs": "^17.3.0"
38
38
  },
39
39
  "devDependencies": {
40
- "eslint": "^7.32.0",
40
+ "eslint": "^8.4.1",
41
41
  "eslint-config-prettier": "^8.3.0",
42
42
  "eslint-config-standard": "^16.0.3",
43
43
  "eslint-plugin-import": "^2.25.3",
package/.eslintrc DELETED
@@ -1,64 +0,0 @@
1
- {
2
- "env": {
3
- "node": true
4
- },
5
- "root": true,
6
- "plugins": [
7
- "import",
8
- "prettier"
9
- ],
10
- "extends": [
11
- "standard",
12
- "eslint:recommended",
13
- "prettier"
14
- ],
15
- "rules": {
16
- "@typescript-eslint/no-var-requires": "off",
17
- "arrow-parens": [
18
- "error",
19
- "as-needed"
20
- ],
21
- "import/no-extraneous-dependencies": [
22
- "error",
23
- {
24
- "devDependencies": true
25
- }
26
- ],
27
- "max-len": [
28
- "error",
29
- {
30
- "code": 80,
31
- "ignoreComments": true,
32
- "ignoreRegExpLiterals": true,
33
- "ignoreTemplateLiterals": true,
34
- "ignoreTrailingComments": true,
35
- "ignoreStrings": true,
36
- "ignoreUrls": true
37
- }
38
- ],
39
- "newline-before-return": "error",
40
- "object-curly-spacing": [
41
- "error",
42
- "always"
43
- ],
44
- "prefer-const": "error",
45
- "prettier/prettier": [
46
- "error",
47
- {
48
- "arrowParens": "avoid",
49
- "bracketSpacing": true,
50
- "printWidth": 80,
51
- "quoteProps": "as-needed",
52
- "semi": false,
53
- "singleQuote": true,
54
- "tabWidth": 2,
55
- "trailingComma": "none"
56
- }
57
- ],
58
- "radix": [
59
- "error",
60
- "as-needed"
61
- ],
62
- "spaced-comment": ["error", "always"]
63
- }
64
- }