Skip to content

Commit 3f24976

Browse files
authored
Merge pull request #40 from rodekruis/build.npm-update
build: npm update
2 parents 5b8d54a + 08011f7 commit 3f24976

Some content is hidden

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

47 files changed

+11151
-6232
lines changed

.eslintrc.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,30 @@ module.exports = {
33
parserOptions: {
44
project: "tsconfig.json",
55
sourceType: "module",
6+
ecmaVersion: "latest",
67
},
7-
plugins: ["@typescript-eslint/eslint-plugin"],
8+
plugins: ["@typescript-eslint/eslint-plugin", "simple-import-sort"],
89
extends: [
9-
"airbnb-base",
10-
"airbnb-typescript/base",
10+
"eslint:recommended",
11+
"plugin:import/recommended",
12+
"plugin:import/typescript",
1113
"prettier",
1214
"plugin:prettier/recommended",
1315
],
1416
root: true,
15-
env: {
16-
node: true,
17-
jest: true,
18-
},
17+
env: { node: true, jest: true },
1918
ignorePatterns: [".eslintrc.js"],
19+
rules: {
20+
"no-unused-vars": "off",
21+
"@typescript-eslint/no-unused-vars": "error",
22+
"simple-import-sort/imports": "error",
23+
"simple-import-sort/exports": "error",
24+
},
2025
overrides: [
2126
{
2227
files: ["*.entity.ts"],
23-
rules: {
24-
"max-classes-per-file": ["error", 2],
25-
},
28+
rules: { "max-classes-per-file": ["error", 2] },
2629
},
2730
],
31+
settings: { "import/resolver": { typescript: true, node: true } },
2832
};

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"tabWidth": 4,
33
"trailingComma": "all",
4+
"objectWrap": "collapse",
45
"overrides": [
56
{
67
"files": ["*.json", "*.yml", ".prettierrc"],

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ Protected APIs are accessible by providing a [Bearer](https://swagger.io/docs/sp
8484

8585
### How to access the restricted data?
8686

87-
- Admin access is granted by using `ADMIN_CODE` (see [ENVIRONMENT](./docs/ENVIRONMENT.md)) as token.
88-
- Required to Create Event, Update Event, Delete Event, Create Event Layer, and Delete Event Layer.
89-
- Event read access is granted by using the response from [POST /events/{id}/code](https://ada.510.global/api/swagger/#/event-code/EventController_code) as token.
90-
- POST body should send the `code` set for event with id {id}.
91-
- Required to Read Restricted Event, and Read Restricted Event Layer.
87+
- Admin access is granted by using `ADMIN_CODE` (see [ENVIRONMENT](./docs/ENVIRONMENT.md)) as token.
88+
- Required to Create Event, Update Event, Delete Event, Create Event Layer, and Delete Event Layer.
89+
- Event read access is granted by using the response from [POST /events/{id}/code](https://ada.510.global/api/swagger/#/event-code/EventController_code) as token.
90+
- POST body should send the `code` set for event with id {id}.
91+
- Required to Read Restricted Event, and Read Restricted Event Layer.
9292

9393
## Installation
9494

e2e/app.e2e-spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* eslint-disable import/no-extraneous-dependencies */
2-
import { Test, TestingModule } from '@nestjs/testing';
32
import { INestApplication } from '@nestjs/common';
3+
import { Test, TestingModule } from '@nestjs/testing';
44
import request from 'supertest';
5+
56
import AppModule from '../src/app.module';
67

78
describe('AppController (e2e)', () => {

e2e/jest.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
"rootDir": ".",
44
"testEnvironment": "node",
55
"testRegex": ".e2e-spec.ts$",
6-
"transform": {
7-
"^.+\\.(t|j)s$": "ts-jest"
8-
}
6+
"transform": { "^.+\\.(t|j)s$": "ts-jest" }
97
}

jest.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22
"moduleFileExtensions": ["js", "json", "ts"],
33
"rootDir": "src",
44
"testRegex": ".*\\.spec\\.ts$",
5-
"transform": {
6-
"^.+\\.(t|j)s$": "ts-jest"
7-
},
5+
"transform": { "^.+\\.(t|j)s$": "ts-jest" },
86
"coverageThreshold": {
9-
"global": {
10-
"branches": 80,
11-
"functions": 20,
12-
"lines": 60,
13-
"statements": 60
14-
}
7+
"global": { "branches": 80, "functions": 20, "lines": 60, "statements": 60 }
158
},
169
"collectCoverageFrom": [
1710
"**/*.(t|j)s",

nest-cli.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"collection": "@nestjs/schematics",
33
"sourceRoot": "src",
4-
"compilerOptions": {
5-
"assets": ["i18n/**/*"]
6-
}
4+
"compilerOptions": { "assets": ["i18n/**/*"] }
75
}

0 commit comments

Comments
 (0)