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

[Feature]: Add browser compatibility linter #33661

Open
1 task done
spmonahan opened this issue Jan 15, 2025 · 0 comments
Open
1 task done

[Feature]: Add browser compatibility linter #33661

spmonahan opened this issue Jan 15, 2025 · 0 comments

Comments

@spmonahan
Copy link
Contributor

spmonahan commented Jan 15, 2025

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

I want a lint rule that enforces Fluent v9's browser support matrix during development and build time.

I'd like something like caniuse.com the eslint plugin. A quick search reveals that such an eslint plugin already exists: eslint-plugin-compat.

Assuming this plugin works well I'd like to see:

  1. All issues from this plugin are errors that block building/releasing
  2. When an issue is found we do one of the following
    1. Implement a basic polyfill or disable the behavior for unsupported browsers
    2. Find a different solution
    3. Document the feature gap (e.g., for features that fall under "partial support")

A case to consider is if and how this linter should handle transpiled code. For example, when to transpile our code to a specific ES version, do we see any potential for missed compatibility issues?

Additional context

This issue came up recently with Animation.persist(), a feature that falls in our partial browser support matrix. It's non-trivial to polyfill this feature to spec and it cannot be transpiled. Ultimately we landed on a "good enough" polyfill which has addressed the issue for our partner.

Ideally we would have been aware of this issue when creating the feature so we could be proactive about changing or documenting it, rather than reactive and handling a bug fix.

Have you discussed this feature with our team

@Hotell

Validations

  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

Medium

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

No branches or pull requests

3 participants