Skip to content

Commit d93386c

Browse files
committed
chore: added example app, started module writing
1 parent 6d1f3f7 commit d93386c

21 files changed

+5273
-2785
lines changed

.eslintrc.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

.eslintrc.json

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true,
6+
"jest": true
7+
},
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"project": "example-app/tsconfig.json",
11+
"sourceType": "module"
12+
},
13+
"plugins": [
14+
"@typescript-eslint",
15+
"prefer-arrow",
16+
"jsdoc",
17+
"jest",
18+
"import"
19+
],
20+
"extends": [
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/eslint-recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
25+
"plugin:jest/recommended"
26+
],
27+
"settings": {
28+
"import/core-modules": [
29+
"axios"
30+
]
31+
},
32+
"rules": {
33+
"lines-between-class-members": [
34+
"error",
35+
"always",
36+
{ "exceptAfterSingleLine": true }
37+
],
38+
"strict": "error",
39+
"object-curly-spacing": ["error" ,"always"],
40+
"import/prefer-default-export": "off",
41+
"@typescript-eslint/no-unused-vars": "off",
42+
"import/order": [
43+
"error",
44+
{
45+
"groups": [
46+
"builtin",
47+
"external",
48+
"parent",
49+
"sibling",
50+
"index"
51+
],
52+
"newlines-between": "always"
53+
}
54+
],
55+
"class-methods-use-this": "off",
56+
"no-useless-constructor": "off",
57+
"no-empty-function": "off",
58+
"newline-before-return": "error",
59+
"max-len": [
60+
"error",
61+
140
62+
],
63+
"@typescript-eslint/no-unsafe-return": "off",
64+
"@typescript-eslint/no-unsafe-call": "off",
65+
"@typescript-eslint/no-unsafe-member-access": "off",
66+
"@typescript-eslint/no-unsafe-assignment": "off",
67+
"@typescript-eslint/explicit-module-boundary-types": "off",
68+
"new-cap": "off",
69+
"@typescript-eslint/no-empty-function": "error",
70+
"@typescript-eslint/no-useless-constructor": "error",
71+
"@typescript-eslint/adjacent-overload-signatures": "error",
72+
"@typescript-eslint/array-type": "off",
73+
"@typescript-eslint/ban-types": "off",
74+
"@typescript-eslint/explicit-member-accessibility": [
75+
"error",
76+
{
77+
"overrides": {
78+
"constructors": "off"
79+
}
80+
}
81+
],
82+
"indent": [
83+
"error",
84+
2,
85+
{
86+
"FunctionDeclaration": {
87+
"parameters": "first"
88+
},
89+
"SwitchCase": 1
90+
}
91+
],
92+
"@typescript-eslint/interface-name-prefix": "off",
93+
"@typescript-eslint/no-empty-interface": "off",
94+
"@typescript-eslint/no-explicit-any": "error",
95+
"@typescript-eslint/no-misused-new": "error",
96+
"@typescript-eslint/no-namespace": "error",
97+
"@typescript-eslint/no-parameter-properties": "off",
98+
"@typescript-eslint/consistent-type-assertions": "error",
99+
"@typescript-eslint/no-use-before-declare": "off",
100+
"@typescript-eslint/no-var-requires": "error",
101+
"@typescript-eslint/prefer-for-of": "error",
102+
"@typescript-eslint/prefer-function-type": "off",
103+
"@typescript-eslint/prefer-namespace-keyword": "error",
104+
"@typescript-eslint/type-annotation-spacing": "error",
105+
"@typescript-eslint/unified-signatures": "off",
106+
"arrow-body-style": "error",
107+
"arrow-parens": [
108+
"off",
109+
"as-needed"
110+
],
111+
"complexity": "off",
112+
"constructor-super": "error",
113+
"curly": ["error", "all"],
114+
"dot-notation": "error",
115+
"eol-last": [
116+
"error",
117+
"always"
118+
],
119+
"guard-for-in": "error",
120+
"jest/expect-expect": [
121+
"error",
122+
{
123+
"assertFunctionNames": ["expect", "request.*.expect", "request.**.expect", "request.*.expect*"]
124+
}
125+
],
126+
"max-classes-per-file": "off",
127+
"new-parens": "error",
128+
"no-bitwise": "error",
129+
"no-caller": "error",
130+
"no-cond-assign": "error",
131+
"no-console": "error",
132+
"no-debugger": "error",
133+
"no-empty": "error",
134+
"no-empty-functions": "off",
135+
"no-fallthrough": "off",
136+
"no-invalid-this": "off",
137+
"no-multiple-empty-lines": [
138+
"error",
139+
{
140+
"max": 1
141+
}
142+
],
143+
"no-new-wrappers": "error",
144+
"no-return-await": "error",
145+
"no-throw-literal": "error",
146+
"no-undef-init": "off",
147+
"no-unsafe-finally": "error",
148+
"no-unused-labels": "error",
149+
"no-var": "error",
150+
"object-shorthand": "error",
151+
"one-var": "off",
152+
"prefer-const": "error",
153+
"quote-props": [
154+
"error",
155+
"consistent-as-needed"
156+
],
157+
"radix": "error",
158+
"some-rule": "off",
159+
"space-before-function-paren": [
160+
"error",
161+
{
162+
"anonymous": "never",
163+
"asyncArrow": "always",
164+
"named": "never"
165+
}
166+
],
167+
"use-isnan": "error",
168+
"valid-typeof": "off",
169+
"quotes": [
170+
"error",
171+
"single"
172+
],
173+
"comma-dangle": [
174+
"error",
175+
"always-multiline"
176+
],
177+
"@typescript-eslint/prefer-readonly": "error",
178+
"prefer-arrow/prefer-arrow-functions": "error",
179+
"spaced-comment": [
180+
"error",
181+
"always"
182+
],
183+
"jsdoc/check-indentation": 1,
184+
"jsdoc/check-alignment": 1,
185+
"no-underscore-dangle": [
186+
"error",
187+
{
188+
"allow": [
189+
"_id"
190+
]
191+
}
192+
],
193+
"@typescript-eslint/await-thenable": "off",
194+
"@typescript-eslint/member-ordering": "error"
195+
},
196+
"overrides": [
197+
{
198+
"files": [
199+
"**/**.spec.ts"
200+
],
201+
"rules": {
202+
"@typescript-eslint/unbound-method": "off",
203+
"@typescript-eslint/explicit-function-return-type": "off"
204+
}
205+
}
206+
]
207+
}

example-app/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# compiled output
2+
/dist
3+
/node_modules
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# OS
14+
.DS_Store
15+
16+
# Tests
17+
/coverage
18+
/.nyc_output
19+
20+
# IDEs and editors
21+
/.idea
22+
.project
23+
.classpath
24+
.c9/
25+
*.launch
26+
.settings/
27+
*.sublime-workspace
28+
29+
# IDE - VSCode
30+
.vscode/*
31+
!.vscode/settings.json
32+
!.vscode/tasks.json
33+
!.vscode/launch.json
34+
!.vscode/extensions.json

example-app/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
6+
[travis-url]: https://travis-ci.org/nestjs/nest
7+
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
8+
[linux-url]: https://travis-ci.org/nestjs/nest
9+
10+
<p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
11+
<p align="center">
12+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
13+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
14+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
15+
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
16+
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
17+
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
18+
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
19+
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
20+
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
21+
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
22+
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
23+
</p>
24+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
25+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
26+
27+
## Description
28+
29+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
30+
31+
## Installation
32+
33+
```bash
34+
$ npm install
35+
```
36+
37+
## Running the app
38+
39+
```bash
40+
# development
41+
$ npm run start
42+
43+
# watch mode
44+
$ npm run start:dev
45+
46+
# production mode
47+
$ npm run start:prod
48+
```
49+
50+
## Test
51+
52+
```bash
53+
# unit tests
54+
$ npm run test
55+
56+
# e2e tests
57+
$ npm run test:e2e
58+
59+
# test coverage
60+
$ npm run test:cov
61+
```
62+
63+
## Support
64+
65+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
66+
67+
## Stay in touch
68+
69+
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
70+
- Website - [https://nestjs.com](https://nestjs.com/)
71+
- Twitter - [@nestframework](https://twitter.com/nestframework)
72+
73+
## License
74+
75+
Nest is [MIT licensed](LICENSE).

example-app/nest-cli.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"collection": "@nestjs/schematics",
3+
"sourceRoot": "src"
4+
}

0 commit comments

Comments
 (0)