chore: open explicit-any check, add suppress annotations for special cases
This commit is contained in:
Родитель
93643b7fe0
Коммит
1c671e0653
|
@ -21,7 +21,6 @@
|
|||
"prettier/prettier": ["error", {"printWidth": 120}],
|
||||
"max-len": ["error", {"code": 120, "ignorePattern": "^import\\s.+\\sfrom\\s.+;$", "ignoreStrings": true}],
|
||||
"@typescript-eslint/no-empty-function": ["error", { "allow": ["constructors"] }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"object-curly-spacing": ["error", "always"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ export class TelemetryClient {
|
|||
* check if it is a valid package json
|
||||
* @param packageJSON package json
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private static isValidPackageJSON(packageJSON: any): boolean {
|
||||
return packageJSON.name && packageJSON.publisher && packageJSON.version && packageJSON.aiKey;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ export class Utility {
|
|||
* get json content from file
|
||||
* @param filePath file path
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
public static async getJsonContent(filePath: string): Promise<any> {
|
||||
return fs.readJson(filePath, { encoding: Constants.UTF8 });
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ export class DigitalTwinGraph {
|
|||
* @param context extension context
|
||||
* @param fileName file name
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private static async resolveDefinition(context: vscode.ExtensionContext, fileName: string): Promise<any> {
|
||||
const filePath: string = context.asAbsolutePath(
|
||||
path.join(Constants.RESOURCE_FOLDER, Constants.DEFINITION_FOLDER, fileName)
|
||||
|
@ -112,6 +113,7 @@ export class DigitalTwinGraph {
|
|||
* check if it is a valid node
|
||||
* @param node node
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private static isValidNode(node: any): boolean {
|
||||
return node.id && node.name;
|
||||
}
|
||||
|
@ -284,6 +286,7 @@ export class DigitalTwinGraph {
|
|||
* build DigitalTwin graph
|
||||
* @param graphJson json object of graph definition
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private buildGraph(graphJson: any): void {
|
||||
this.parse(graphJson);
|
||||
this.inheritProperties();
|
||||
|
@ -295,6 +298,7 @@ export class DigitalTwinGraph {
|
|||
* parse content of graph json
|
||||
* @param graphJson json object of graph definition
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private parse(graphJson: any): void {
|
||||
for (const key in graphJson) {
|
||||
if (graphJson.hasOwnProperty(key)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче