Skip to content

Commit

Permalink
fix dependencies and solve lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
h2floh committed Aug 26, 2024
1 parent 8c63162 commit 2409319
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 134 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,6 @@ module.exports = {
"default": "array"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": {
"message": "Avoid using the `Object` type. Did you mean `object`?"
},
"Function": {
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
},
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "off",
Expand Down
111 changes: 11 additions & 100 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@types/react-dom": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/eslint-plugin-tslint": "^7.0.2",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/parser": "^8.2.0",
"base64-inline-loader": "^2.0.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
Expand Down
5 changes: 2 additions & 3 deletions src/MultiIdentityPicker/MultiIdentityPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/ban-types */
import { withAITracking } from '@microsoft/applicationinsights-react-js';
import { SeverityLevel } from "@microsoft/applicationinsights-web";
import {
Expand Down Expand Up @@ -37,7 +36,7 @@ interface MultiIdentityPickerState {
* - Can display Identities saved in a work items text field
* - Can add additional Identies based on Standard Identity picker and save to text field
*/
export class MultiIdentityPicker extends React.Component<{}, MultiIdentityPickerState> {
export class MultiIdentityPicker extends React.Component<object, MultiIdentityPickerState> {
/** Identity Service for Picker */
private identityService: Promise<IVssIdentityService>;
/** Current selected Identities as React Observable */
Expand All @@ -57,7 +56,7 @@ export class MultiIdentityPicker extends React.Component<{}, MultiIdentityPicker
* @param {} props React properties
* @returns {MultiIdentityPicker} MultiIdentityPicker Object
*/
constructor(props: {}) {
constructor(props: object) {
super(props);
this.state = {
pickerProvider: new PeoplePickerProvider()
Expand Down
9 changes: 4 additions & 5 deletions src/VersionedItemsTable/VersionedItemsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-misused-promises */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/ban-types */
import { withAITracking } from "@microsoft/applicationinsights-react-js";
import { SeverityLevel } from "@microsoft/applicationinsights-web";
import { getClient } from "azure-devops-extension-api/Common";
Expand Down Expand Up @@ -58,7 +57,7 @@ import { ILinkItem, LinkStatus } from "./VersionedItemsTableTypes";
* VersionedItemsTable can create a link to a specific Azure Git Repo file called
* VersionedItemLink.
*/
export class VersionedItemsTable extends React.Component<{}> {
export class VersionedItemsTable extends React.Component<object> {

/** Instance of Work Item Form Service to access data of current Work Item */
private workItemFormService : IWorkItemFormService | undefined;
Expand All @@ -75,7 +74,7 @@ export class VersionedItemsTable extends React.Component<{}> {
/** Logging instance */
private logger: Logger;
/** File List of Repository/Branch for Dropdown box */
private gitDropdownBoxItems: IListBoxItem<{}>[] = [];
private gitDropdownBoxItems: IListBoxItem<object>[] = [];
/** Full Git Item List */
private gitItems: GitItem[] = [];
/** Observable for New Versioned Item Link Disable Property */
Expand All @@ -89,7 +88,7 @@ export class VersionedItemsTable extends React.Component<{}> {
* @param {} props React properties
* @returns {VersionedItemsTable} VersionedItemsTable Object
*/
constructor(props: {}) {
constructor(props: object) {
super(props);
// Dummy because we have to initialize now
this.logger = new Logger(this.constructor.name, undefined,undefined);
Expand Down Expand Up @@ -675,7 +674,7 @@ export class VersionedItemsTable extends React.Component<{}> {
* @param {React.SyntheticEvent<HTMLElement, Event>} event actual event
* @param {IListBoxItem<{}>} item selected File
*/
onSelect (row: ILinkItem, event: React.SyntheticEvent<HTMLElement, Event>, item: IListBoxItem<{}>) : void {
onSelect (row: ILinkItem, event: React.SyntheticEvent<HTMLElement, Event>, item: IListBoxItem<object>) : void {
this.logger.logTrace(`Dropdown selected ${JSON.stringify(item)} ${JSON.stringify(row)}`, SeverityLevel.Verbose);

row.path = item.text!;
Expand Down

0 comments on commit 2409319

Please sign in to comment.