Skip to content

Commit 1c671e0

Browse files
committed
chore: open explicit-any check, add suppress annotations for special cases
1 parent 93643b7 commit 1c671e0

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"prettier/prettier": ["error", {"printWidth": 120}],
2222
"max-len": ["error", {"code": 120, "ignorePattern": "^import\\s.+\\sfrom\\s.+;$", "ignoreStrings": true}],
2323
"@typescript-eslint/no-empty-function": ["error", { "allow": ["constructors"] }],
24-
"@typescript-eslint/no-explicit-any": "off",
2524
"object-curly-spacing": ["error", "always"]
2625
}
2726
}

src/common/telemetryClient.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class TelemetryClient {
1717
* check if it is a valid package json
1818
* @param packageJSON package json
1919
*/
20+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2021
private static isValidPackageJSON(packageJSON: any): boolean {
2122
return packageJSON.name && packageJSON.publisher && packageJSON.version && packageJSON.aiKey;
2223
}

src/common/utility.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export class Utility {
5151
* get json content from file
5252
* @param filePath file path
5353
*/
54+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5455
public static async getJsonContent(filePath: string): Promise<any> {
5556
return fs.readJson(filePath, { encoding: Constants.UTF8 });
5657
}

src/intelliSense/digitalTwinGraph.ts

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export class DigitalTwinGraph {
101101
* @param context extension context
102102
* @param fileName file name
103103
*/
104+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
104105
private static async resolveDefinition(context: vscode.ExtensionContext, fileName: string): Promise<any> {
105106
const filePath: string = context.asAbsolutePath(
106107
path.join(Constants.RESOURCE_FOLDER, Constants.DEFINITION_FOLDER, fileName)
@@ -112,6 +113,7 @@ export class DigitalTwinGraph {
112113
* check if it is a valid node
113114
* @param node node
114115
*/
116+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
115117
private static isValidNode(node: any): boolean {
116118
return node.id && node.name;
117119
}
@@ -284,6 +286,7 @@ export class DigitalTwinGraph {
284286
* build DigitalTwin graph
285287
* @param graphJson json object of graph definition
286288
*/
289+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
287290
private buildGraph(graphJson: any): void {
288291
this.parse(graphJson);
289292
this.inheritProperties();
@@ -295,6 +298,7 @@ export class DigitalTwinGraph {
295298
* parse content of graph json
296299
* @param graphJson json object of graph definition
297300
*/
301+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
298302
private parse(graphJson: any): void {
299303
for (const key in graphJson) {
300304
if (graphJson.hasOwnProperty(key)) {

0 commit comments

Comments
 (0)