Update prettier to latest. Remove tslint (#1641)

* Rev up prettier

* Reformat

* Remove deprecated tslint

* Remove call to tslint and update package-lock.json
This commit is contained in:
Laurent Nguyen
2023-10-03 15:13:24 +00:00
committed by GitHub
parent e3c168b7be
commit 90c1439d34
311 changed files with 1899 additions and 2194 deletions

View File

@@ -40,12 +40,12 @@ export class AddMongoIndexComponent extends React.Component<AddMongoIndexCompone
(value: MongoIndexTypes) => ({
text: getMongoIndexTypeText(value),
key: value,
})
}),
);
private onDescriptionChange = (
event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>,
newValue?: string
newValue?: string,
): void => {
this.props.onIndexAddOrChange(newValue, this.props.type);
};

View File

@@ -90,7 +90,7 @@ describe("MongoIndexingPolicyComponent", () => {
indexToDropIsPresent: boolean,
isMongoIndexingPolicySaveable: boolean,
isMongoIndexingPolicyDiscardable: boolean,
mongoWarningNotificationMessage: string
mongoWarningNotificationMessage: string,
) => {
const addMongoIndexProps = {
mongoIndex: { key: { keys: ["sampleKey"] } },
@@ -107,7 +107,7 @@ describe("MongoIndexingPolicyComponent", () => {
expect(mongoIndexingPolicyComponent.isMongoIndexingPolicySaveable()).toEqual(isMongoIndexingPolicySaveable);
expect(mongoIndexingPolicyComponent.isMongoIndexingPolicyDiscardable()).toEqual(
isMongoIndexingPolicyDiscardable
isMongoIndexingPolicyDiscardable,
);
if (mongoWarningNotificationMessage) {
const elementAsString = renderToString(mongoIndexingPolicyComponent.getMongoWarningNotificationMessage());
@@ -115,7 +115,7 @@ describe("MongoIndexingPolicyComponent", () => {
} else {
expect(mongoIndexingPolicyComponent.getMongoWarningNotificationMessage()).toBeUndefined();
}
}
},
);
});
});

View File

@@ -130,7 +130,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
public getMongoWarningNotificationMessage = (): JSX.Element => {
const warningMessage = this.props.indexesToAdd.find(
(addMongoIndexProps) => addMongoIndexProps.notification?.type === MongoNotificationType.Warning
(addMongoIndexProps) => addMongoIndexProps.notification?.type === MongoNotificationType.Warning,
)?.notification.message;
if (warningMessage) {
@@ -163,7 +163,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
private getMongoIndexDisplayProps = (
mongoIndex: MongoIndex,
arrayPosition: number,
isCurrentIndex: boolean
isCurrentIndex: boolean,
): MongoIndexDisplayProps => {
const keys = mongoIndex?.key?.keys;
const type = getMongoIndexType(keys);
@@ -261,7 +261,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
private renderIndexesToBeDropped = (): JSX.Element => {
const indexesToBeDropped = this.props.indexesToDrop.map((dropIndex, arrayPosition) =>
this.getMongoIndexDisplayProps(this.props.mongoIndexes[dropIndex], arrayPosition, false)
this.getMongoIndexDisplayProps(this.props.mongoIndexes[dropIndex], arrayPosition, false),
);
return (