Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarcloud issues fixes #3499

Merged
merged 9 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/default-param-last": "warn",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
Expand All @@ -122,7 +124,7 @@
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/prefer-function-type": "error",
Expand Down Expand Up @@ -204,6 +206,7 @@
"newline-per-chained-call": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-promise-reject-errors": "error",
"import/order": "off",
"max-len": [
"error",
Expand All @@ -226,6 +229,8 @@
"no-caller": "error",
"no-global-assign": "error",
"no-cond-assign": "error",
"no-constant-binary-expression": "error",
"no-useless-rename": "error",
"no-console": [
"error",
{
Expand Down Expand Up @@ -324,7 +329,8 @@
{
"files": ["*.spec.ts", "*.test.ts"],
"rules": {
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"max-lines": "off"
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/proxy.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
// workaround for REPO-2260
onProxyRes: function (proxyRes) {
const header = proxyRes.headers['www-authenticate'];
if (header && header.startsWith('Basic')) {
if (header?.startsWith('Basic')) {
proxyRes.headers['www-authenticate'] = 'x' + header;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
enableProdMode();
}

void platformBrowserDynamic().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModule(AppModule);

Check warning on line 35 in app/src/main.ts

View workflow job for this annotation

GitHub Actions / lint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Expand Down
2 changes: 1 addition & 1 deletion docs/ja/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ test.describe('Special permissions : ', () => {
await managerSiteActions.addSiteMember(sitePrivate, userCollaborator, Site.RoleEnum.SiteCollaborator);
await managerSiteActions.addSiteMember(sitePrivate, userDemoted, Site.RoleEnum.SiteManager);

await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, docLibId, testData.fileDocx.name);
fileDocxFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, docLibId, testData.fileDocxFav.name)).entry.id;
await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocx.name, docLibId);
fileDocxFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxFav.name, docLibId)).entry.id;
await managerNodeActions.createFile(testData.file.name, docLibId);
fileFavId = (await managerNodeActions.createFile(testData.fileFav.name, docLibId)).entry.id;
fileDocxSharedId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, docLibId, testData.fileDocxShared.name)).entry.id;
fileDocxSharedFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, docLibId, testData.fileDocxSharedFav.name)).entry.id;
fileDocxSharedId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxShared.name, docLibId)).entry.id;
fileDocxSharedFavId = (await managerFileActions.uploadFileWithRename(TEST_FILES.DOCX.path, testData.fileDocxSharedFav.name, docLibId)).entry.id;
fileSharedId = (await managerNodeActions.createFile(testData.fileShared.name, docLibId)).entry.id;
fileSharedFavId = (await managerNodeActions.createFile(testData.fileSharedFav.name, docLibId)).entry.id;
fileLockedId = (await managerNodeActions.createFile(testData.fileLocked.name, docLibId)).entry.id;
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright/viewer/src/tests/viewer-protected.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test.describe('viewer file', () => {
let folderId: string;
let fileDocxId: string;

test.beforeAll(async ({ fileAction, shareAction, favoritesPageAction: favoritesPageAction }) => {
test.beforeAll(async ({ fileAction, shareAction, favoritesPageAction }) => {
await apiClientFactory.setUpAcaBackend('hruser');
const node = await apiClientFactory.nodes.createNode('-my-', { name: randomFolderName, nodeType: 'cm:folder', relativePath: '/' });
folderId = node.entry.id;
Expand Down
Loading
Loading