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 a lint to disallow MXC API accesses #16933

Closed
jryans opened this issue Apr 13, 2021 · 1 comment · Fixed by matrix-org/matrix-react-sdk#6293
Closed

Create a lint to disallow MXC API accesses #16933

jryans opened this issue Apr 13, 2021 · 1 comment · Fixed by matrix-org/matrix-react-sdk#6293
Assignees
Labels
P2 T-Task Tasks for the team like planning

Comments

@jryans
Copy link
Collaborator

jryans commented Apr 13, 2021

As mentioned in docs, we want to ensure MXC access flows through centralised modules, instead of accessing MXC endpoints directly.

To help with this, we'd like to create a lint rule that errors when using the direct MXC APIs.

This work depends #16276, which converts our custom linting bits to a plugin which we can then extend with a custom rule.

@jryans jryans added P2 T-Task Tasks for the team like planning labels Apr 13, 2021
@jryans
Copy link
Collaborator Author

jryans commented Jun 30, 2021

@turt2live says linting should block:

  • mxcUrlToHttp
  • getHttpUriForMxc

@jryans jryans self-assigned this Jun 30, 2021
jryans added a commit to matrix-org/matrix-react-sdk that referenced this issue Jun 30, 2021
This adds linting rules to ensure that MXC APIs are only accessed via the
`Media` helper so they can be customised easily when desired.

Fixes element-hq/element-web#16933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant