chore: linting and build fixes

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2025-05-19 11:42:26 +02:00
parent 4869f3310c
commit 431e3df61b
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82
4 changed files with 17 additions and 34 deletions

View file

@ -202,6 +202,7 @@ export class NotesController {
@RequestNoteId() noteId: number, @RequestNoteId() noteId: number,
@Param('username') username: NoteUserPermissionEntryDto['username'], @Param('username') username: NoteUserPermissionEntryDto['username'],
): Promise<NotePermissionsDto> { ): Promise<NotePermissionsDto> {
// TODO Fix this removing wrong user permission!
try { try {
await this.permissionService.removeUserPermission(noteId, userId); await this.permissionService.removeUserPermission(noteId, userId);
return await this.noteService.toNotePermissionsDto(noteId); return await this.noteService.toNotePermissionsDto(noteId);

View file

@ -5,36 +5,19 @@
*/ */
module.exports = { module.exports = {
"parser": "@typescript-eslint/parser", parser: '@typescript-eslint/parser',
"parserOptions": { parserOptions: {
"project": [ project: ['./tsconfig.test.json'],
"./tsconfig.test.json"
]
}, },
"plugins": [ plugins: ['@typescript-eslint', 'prettier'],
"@typescript-eslint", extends: [
"jest", 'eslint:recommended',
"prettier" 'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/recommended',
'prettier',
], ],
"env": { rules: {
"jest": true, 'prettier/prettier': ['error', require('./.prettierrc.json')],
"jest/globals": true
}, },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"prettier/prettier": ["error",
require('./.prettierrc.json')
],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
} }

View file

@ -3,7 +3,6 @@
* *
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { FieldNameApiToken } from './api-token'
/** /**
* The AuthorshipInfo holds the information from where to where one {@link User} has changed a {@link Note} * The AuthorshipInfo holds the information from where to where one {@link User} has changed a {@link Note}

View file

@ -1,4 +1,4 @@
{ {
"extends" : "./tsconfig.esm.json", "extends" : "./tsconfig.cjs.json",
"exclude": ["./dist"] "exclude": ["./dist"]
} }