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

chore(devDeps): upgrade eslint packages #1103

Merged
merged 3 commits into from
Oct 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
955 changes: 472 additions & 483 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@
"@types/node": "16.18.35",
"@types/readable-stream": "^2.3.13",
"@types/sinon": "10.0.2",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"c8": "^7.11.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-spies": "^1.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-unused-imports": "^1.1.4",
"eslint-plugin-workspaces": "^0.8.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-workspaces": "^0.9.0",
"husky": "^7.0.4",
"mocha": "^9.2.2",
"prettier": "^2.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-coap/src/coap-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class CoapClient implements ProtocolClient {
public setSecurity = (metadata: Array<TD.SecurityScheme>): boolean => true;

private uriToOptions(uri: string): CoapRequestParams {
// eslint-disable-next-line node/no-deprecated-api
// eslint-disable-next-line n/no-deprecated-api
const requestUri = url.parse(uri);
const agentOptions = this.agentOptions;
agentOptions.type = net.isIPv6(requestUri.hostname ?? "") ? "udp6" : "udp4";
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-coap/test/coap-server-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ class CoapServerTest {
// check values of readallproperties
const responseAll = await coapClient.readResource(new TD.Form(baseUri));
expect(await decodeContent(responseAll)).to.deep.equal({
image: image,
image,
testInteger: integer,
testBoolean: boolean,
testString: string,
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/src/codecs/tuya-codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class HttpTuyaCodec implements ContentCodec {
commands: [
{
code: schema["tuya:PropertyName"],
value: value,
value,
},
],
};
Expand Down
4 changes: 2 additions & 2 deletions packages/binding-http/src/credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@
const body = request.body ? request.body.read().toString() : "";
const headers = this.getHeaders(true, request.headers.raw(), body, url, request.method);
Object.assign(headers, request.headers.raw());
return new Request(url, { method: request.method, body: body !== "" ? body : undefined, headers: headers });
return new Request(url, { method: request.method, body: body !== "" ? body : undefined, headers });
}

protected async requestAndRefreshToken(refresh: boolean): Promise<void> {
const headers = this.getHeaders(false, {}, "");
const request = {
headers: headers,
headers,

Check warning on line 196 in packages/binding-http/src/credential.ts

View check run for this annotation

Codecov / codecov/patch

packages/binding-http/src/credential.ts#L196

Added line #L196 was not covered by tests
method: "GET",
};
let url = `${this.baseUri}/token?grant_type=1`;
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/src/http-client-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default class HttpClient implements ProtocolClient {
const headers = content ? [["content-type", content.type]] : [];

const request = await this.generateFetchRequest(form, "POST", {
headers: headers,
headers,
body: content?.body,
});

Expand Down
4 changes: 2 additions & 2 deletions packages/binding-http/src/oauth-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ function createRequestFunction(rejectUnauthorized: boolean) {
const parsedURL = new URL(url);

const options: RequestOptions = {
method: method,
method,
host: parsedURL.hostname,
port: parseInt(parsedURL.port),
path: parsedURL.pathname + parsedURL.search,
headers: headers,
headers,
};

options.rejectUnauthorized = rejectUnauthorized;
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/test/http-server-oauth-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class OAuthServerTests {
};
const authConfig: OAuth2ServerConfig = {
scheme: "oauth2",
method: method,
method,
};
this.server = new HttpServer({
security: [authConfig],
Expand Down
12 changes: 6 additions & 6 deletions packages/binding-http/test/memory-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ export default class InMemoryModel implements ClientCredentialsModel, PasswordMo
async saveToken(token: Token, client: Client, user: User, callback?: Callback<Token>): Promise<Token> {
const { accessToken, accessTokenExpiresAt, refreshTokenExpiresAt, refreshToken } = token;
this.tokens.push({
accessToken: accessToken,
accessTokenExpiresAt: accessTokenExpiresAt,
client: client,
refreshToken: refreshToken,
refreshTokenExpiresAt: refreshTokenExpiresAt,
user: user,
accessToken,
accessTokenExpiresAt,
client,
refreshToken,
refreshTokenExpiresAt,
user,
});
if (callback) {
callback(null, this.tokens[this.tokens.length - 1]);
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-modbus/test/test-modbus-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class ModbusServer {
this.registers[addr] = value;
},
};
this.serverTCP = new ServerTCP(vector, { host: "127.0.0.1", port: 8502, debug: true, unitID: unitID });
this.serverTCP = new ServerTCP(vector, { host: "127.0.0.1", port: 8502, debug: true, unitID });
}

setRegisters(data: Array<number>, start = 0): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("MQTT client implementation", () => {

WoT.produce({
title: "TestWoTMQTT",
events: events,
events,
}).then((thing) => {
thing.expose().then(() => {
info(`Exposed ${thing.getThingDescription().title}`);
Expand Down Expand Up @@ -124,7 +124,7 @@ describe("MQTT client implementation", () => {

WoT.produce({
title: "TestWoTMQTT",
events: events,
events,
}).then((thing) => {
thing.expose().then(() => {
info(`Exposed ${thing.getThingDescription().title}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/consumed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export default class ConsumedThing extends TD.Thing implements IConsumedThing {
this.ensureClientSecurity(client, form);
}
}
return { client: client, form: form };
return { client, form };
}

async readProperty(propertyName: string, options?: WoT.InteractionOptions): Promise<WoT.InteractionOutput> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default class Helpers implements Resolver {
}
return {
valid: isValid,
errors: errors,
errors,
};
}

Expand Down
4 changes: 2 additions & 2 deletions packages/td-tools/src/thing-model-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class ThingModelHelpers {
}
return {
valid: isValid,
errors: errors,
errors,
};
}

Expand Down Expand Up @@ -632,7 +632,7 @@ export class ThingModelHelpers {
}
return {
valid: isValid,
errors: errors,
errors,
};
}

Expand Down
8 changes: 4 additions & 4 deletions packages/td-tools/src/util/asset-interface-description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
smInformation.properties.set(iValue.idShort, []);
}
const propInter: AASInteraction = {
endpointMetadata: endpointMetadata,
endpointMetadata,
interaction: iValue,
};
smInformation.properties.get(iValue.idShort)?.push(propInter);
Expand All @@ -476,7 +476,7 @@
smInformation.actions.set(iValue.idShort, []);
}
const actInter: AASInteraction = {
endpointMetadata: endpointMetadata,
endpointMetadata,

Check warning on line 479 in packages/td-tools/src/util/asset-interface-description.ts

View check run for this annotation

Codecov / codecov/patch

packages/td-tools/src/util/asset-interface-description.ts#L479

Added line #L479 was not covered by tests
interaction: iValue,
};
smInformation.actions.get(iValue.idShort)?.push(actInter);
Expand All @@ -490,7 +490,7 @@
smInformation.events.set(iValue.idShort, []);
}
const evInter: AASInteraction = {
endpointMetadata: endpointMetadata,
endpointMetadata,

Check warning on line 493 in packages/td-tools/src/util/asset-interface-description.ts

View check run for this annotation

Codecov / codecov/patch

packages/td-tools/src/util/asset-interface-description.ts#L493

Added line #L493 was not covered by tests
interaction: iValue,
};
smInformation.events.get(iValue.idShort)?.push(evInter);
Expand Down Expand Up @@ -878,7 +878,7 @@

properties.push({
idShort: propertyKey,
description: description,
description,
value: propertyValues,
modelType: "SubmodelElementCollection",
});
Expand Down
Loading