Skip to content

Please include examples following the default ESLint rules for SPFx 1.15.2 #8415

@ekdegerman

Description

@ekdegerman

I can see that this page has been updated to adjust to the new SPFx version with its new graph client version MSGraphClientV3. However, the examples are still breaking the default ESLint rules rules regarding the use of any that came with the 1.15 version of SPFx. I would assume the default rules that remain in 1.15.2 are the ones the team recommend to keep activated. Since the default compiler options in SPFx 1.15.2 disallow both explicit and implicit any, it would therefore be really helpful to have clear guidance on how to handle typing for the responses, especially in more complex scenarios. One example would be batching and looping the responses, dealing with their status and result etc. I haven't been able to find any up-to-date examples of this in the documentation or code samples so far, though I realize this change is pretty recent. While microsoft-graph-types and its beta version have types for objects returned from the graph (like MicrosoftGraph.User in the example), I can't see any predefined types for the graph responses themselves either there or in sp-http. Some guidance on the recommended way of doing this without disabling the recommended rules or breaking them when defining the callbacks or trying to process the results would be much appreciated...


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsCategory: SharePoint developer/development documentation relatedarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions