Skip to content

Commit 3519cc1

Browse files
committed
feat: security
1 parent 8f0f816 commit 3519cc1

File tree

39 files changed

+549
-250
lines changed

39 files changed

+549
-250
lines changed

.eslintignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules
2+
dist
3+
coverage
4+
.eslintrc.js
5+
ormconfig.js
6+
package.json
7+
tsconfig.json
8+
yarn.lock
9+
test
10+
*.spec.ts
11+
test.ts
12+
*.e2e-spec.ts

.eslintrc.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
parserOptions: {
5+
tsconfigRootDir: __dirname,
6+
project: "./tsconfig.eslint.json",
7+
},
8+
plugins: ["@typescript-eslint"],
9+
extends: [
10+
"eslint:recommended",
11+
"plugin:@typescript-eslint/eslint-recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
14+
],
15+
rules: {
16+
"@typescript-eslint/no-unsafe-assignment": 0,
17+
"@typescript-eslint/no-unsafe-member-access": 0,
18+
"@typescript-eslint/no-unsafe-call": 0,
19+
"@typescript-eslint/no-unsafe-return": 0,
20+
"@typescript-eslint/no-floating-promises": 0,
21+
"@typescript-eslint/no-explicit-any": 0,
22+
"@typescript-eslint/explicit-module-boundary-types": 0,
23+
"@typescript-eslint/no-empty-function": 0,
24+
"@typescript-eslint/parser": 0,
25+
"@typescript-eslint/unbound-method": 0,
26+
"@typescript-eslint/no-misused-promises": 0,
27+
quotes: [2, "single"]
28+
},
29+
};
30+

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"start": "ng serve",
1111
"build": "ng build",
1212
"test": "ng test",
13-
"lint": "ng lint",
13+
"lint": "eslint . --ext .ts",
1414
"e2e": "ng e2e",
1515
"build:libs": "ng build @craftsjs/boilerplate --prod",
1616
"test:libs": "ng test @craftsjs/boilerplate",
@@ -67,7 +67,10 @@
6767
"@types/jasminewd2": "~2.0.3",
6868
"@types/lodash": "4.14.157",
6969
"@types/node": "^12.11.1",
70+
"@typescript-eslint/eslint-plugin": "^4.0.1",
71+
"@typescript-eslint/parser": "^4.0.1",
7072
"codelyzer": "^5.1.2",
73+
"eslint": "^7.8.1",
7174
"jasmine-core": "~3.5.0",
7275
"jasmine-spec-reporter": "~5.0.0",
7376
"karma": "~5.0.0",
@@ -98,4 +101,4 @@
98101
"modal",
99102
"notifier"
100103
]
101-
}
104+
}

projects/craftsjs-app/src/app/@redux/account/models/impersonate-input.model.ts

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

projects/craftsjs-app/src/app/@redux/account/models/impersonate-output.model.ts

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

projects/craftsjs-app/src/app/@redux/account/services/account.service.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { StoreModel } from '@redux/shared/models/store.model';
22
import { EditionDto } from './edition-dto.model';
33

4-
export interface EditionStoreModel extends StoreModel<EditionDto> { }
4+
export type EditionStoreModel = StoreModel<EditionDto>

projects/craftsjs-app/src/app/@redux/organization-unit/services/organization-unit.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class OrganizationUnitService extends ServiceApiBase {
2828
}
2929

3030
getRoleOrganizationUnits() {
31-
const url = `user/organization-units`;
31+
const url = 'user/organization-units';
3232
return this.get<OrganizationUnitDto[]>(url);
3333
}
3434

projects/craftsjs-app/src/app/@redux/permission/effects/permission.effects.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class PermissionEffects {
2121
loadData$ = createEffect(() => this._actions$.pipe(
2222
ofType(PermissionActions.loadPermissions),
2323
withLatestFrom(this._store.pipe(select(selectAllPermissions))),
24+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2425
filter(([_, allPermissions]) => allPermissions.length === 0),
2526
switchMap(() =>
2627
this._permissionService.getAll().pipe(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { StoreModel } from '@redux/shared/models/store.model';
22
import { TenantDto } from './tenant-dto.model';
33

4-
export interface TenantStoreModel extends StoreModel<TenantDto> { }
4+
export type TenantStoreModel = StoreModel<TenantDto>

0 commit comments

Comments
 (0)