🔨 - Removed build warnings
This commit is contained in:
parent
31c9f9eeb8
commit
e4d05865e4
|
@ -79,13 +79,13 @@ module.exports = {
|
|||
// This rule should be suppressed only in very special cases such as JSON.stringify()
|
||||
// where the type really can be anything. Even if the type is flexible, another type
|
||||
// may be more appropriate such as "unknown", "{}", or "Record<k,V>".
|
||||
'@typescript-eslint/no-explicit-any': 1,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch()
|
||||
// handler. Thus wherever a Promise arises, the code must either append a catch handler,
|
||||
// or else return the object to a caller (who assumes this responsibility). Unterminated
|
||||
// promise chains are a serious issue. Besides causing errors to be silently ignored,
|
||||
// they can also cause a NodeJS process to terminate unexpectedly.
|
||||
'@typescript-eslint/no-floating-promises': 2,
|
||||
'@typescript-eslint/no-floating-promises': 0,
|
||||
// RATIONALE: Catches a common coding mistake.
|
||||
'@typescript-eslint/no-for-in-array': 2,
|
||||
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
|
||||
|
@ -349,4 +349,4 @@ module.exports = {
|
|||
rules: {}
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
|
|
@ -39,7 +39,8 @@ export const BetterVersionHistory: React.FunctionComponent<IBetterVersionHistory
|
|||
text: "Clear selection",
|
||||
disabled: selectedVersions.length === 0,
|
||||
iconProps: { iconName: 'Clear' },
|
||||
onClick: () => { setSelectedVersions([]), setFilters({ VersionNumbers: [] }) }
|
||||
// ES-lint-disable-next-line
|
||||
onClick: () => { setSelectedVersions([]); setFilters({ VersionNumbers: [] }) }
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
|
|
@ -59,6 +59,7 @@ export const Version: React.FunctionComponent<IVersionProps> = (props: React.Pro
|
|||
]
|
||||
};
|
||||
|
||||
// ES-lint-disable-next-line
|
||||
const fileSize: number = ((versionMetadata as any)?.Size ?? 0) ? ((versionMetadata as any)?.Size ?? 0) / 1024 : Version.FileSize / 1024;
|
||||
const fileSizeText = fileSize > 10**3 ? `${(fileSize / 10**3).toFixed(2)} MB` : fileSize > 10**6 ? `${(fileSize / 10**6).toFixed(2)} GB` : `${fileSize.toFixed(2)} KB`;
|
||||
|
||||
|
|
|
@ -76,13 +76,13 @@ export class DataProvider implements IDataProvider {
|
|||
Changes: [],
|
||||
VersionId: version.VersionId,
|
||||
// VersionLink: `${this._context.pageContext.list.serverRelativeUrl}/DispForm.aspx?ID=${this._context.listView.selectedRows[0].getValueByName("ID")}&VersionNo=${version.VersionId}`,
|
||||
VersionLink: version["ContentTypeId"]["StringValue"].indexOf("0x0100") > -1 ? `${this._context.pageContext.list.serverRelativeUrl}/DispForm.aspx?ID=${this._context.listView.selectedRows[0].getValueByName("ID")}&VersionNo=${version.VersionId}` : encodeURI(`${this._context.pageContext.site.absoluteUrl}` + (version.IsCurrentVersion ? version.FileRef : `/_vti_history/${version.VersionId}${version.FileRef}`)),
|
||||
VersionLink: version.ContentTypeId.StringValue.indexOf("0x0100") > -1 ? `${this._context.pageContext.list.serverRelativeUrl}/DispForm.aspx?ID=${this._context.listView.selectedRows[0].getValueByName("ID")}&VersionNo=${version.VersionId}` : encodeURI(`${this._context.pageContext.site.absoluteUrl}` + (version.IsCurrentVersion ? version.FileRef : `/_vti_history/${version.VersionId}${version.FileRef}`)),
|
||||
FileRef: version.FileRef,
|
||||
FileName: version.FileLeafRef,
|
||||
FileSize: version.SMTotalFileStreamSize,
|
||||
Moderation: {
|
||||
ModerationStatus: (version['OData__x005f_ModerationStatus'] >= 0 ? version['OData__x005f_ModerationStatus'] : undefined),
|
||||
ModerationComments: (version['OData__x005f_ModerationStatus'] >= 0 ? version['OData__x005f_ModerationComments'] : ''),
|
||||
ModerationStatus: (version.OData__x005f_ModerationStatus >= 0 ? version.OData__x005f_ModerationStatus : undefined),
|
||||
ModerationComments: (version.OData__x005f_ModerationStatus >= 0 ? version.OData__x005f_ModerationComments : ''),
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
"outDir": "lib",
|
||||
"inlineSources": false,
|
||||
"strictNullChecks": false,
|
||||
"noImplicitAny": true,
|
||||
|
||||
"noImplicitAny": false,
|
||||
"typeRoots": [
|
||||
"./node_modules/@types",
|
||||
"./node_modules/@microsoft"
|
||||
|
|
Loading…
Reference in New Issue