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

Create eslint rule to prevent the use of ByServerRelativeUrl API #5333

Closed
milanholemans opened this issue Jul 20, 2023 · 2 comments
Closed

Comments

@milanholemans
Copy link
Contributor

Let's add an eslint rule to prevent some SP APIs from being used. We should avoid ByServerRelativeUrl API endpoints because they don't support files and folders with # and % characters in their name.

Following API endpoints should be avoided

  • GetFileByServerRelativeUrl
  • GetFolderByServerRelativeUrl

Instead, we should use:

  • GetFileByServerRelativePath
  • GetFolderByServerRelativePath

This issue is on hold until these issues are closed:

@Jwaegebaert
Copy link
Contributor

Awesome idea to create an eslint rule for this situation so we can prevent it from getting back into our codebase.

@milanholemans
Copy link
Contributor Author

Moved from on hold to help wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants