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

feat(packages): eslint plugin #1045

Draft
wants to merge 115 commits into
base: canary
Choose a base branch
from
Draft

feat(packages): eslint plugin #1045

wants to merge 115 commits into from

Conversation

gabrielmfern
Copy link
Collaborator

@gabrielmfern gabrielmfern commented Nov 21, 2023

Example output from linting one email

   66:21  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account
                                                                 @react-email/no-partially-supported-on-gmail-android
   66:21  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account
                                                                 @react-email/no-partially-supported-on-gmail-i-o-s
   67:21  warning  'rgba()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgba(0:128 0 / 1)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped
        @react-email/no-partially-supported-on-gmail-android
   67:21  warning  'rgba()' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgba(0:128 0 / 1)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped         @react-email/no-partially-supported-on-gmail-desktop-webmail
   67:21  warning  'rgba()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgba(0:128 0 / 1)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped             @react-email/no-partially-supported-on-gmail-i-o-s
   67:21  warning  'rgba()' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgba(0:128 0 / 1)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped  @react-email/no-partially-supported-on-gmail-mobile-webmail
   67:21  error    'conic-gradient()' is not supported on Gmail for Android (versions 2022-12)                                                                                                                                                                                                                                                                                                             @react-email/no-unsupported-on-gmail-android
   67:21  error    'conic-gradient()' is not supported on Gmail for the web (versions 2022-12)                                                                                                                                                                                                                                                                                                             @react-email/no-unsupported-on-gmail-desktop-webmail
   67:21  error    'conic-gradient()' is not supported on Gmail for Android (versions 2022-12)                                                                                                                                                                                                                                                                                                             @react-email/no-unsupported-on-gmail-i-o-s
   67:21  error    'conic-gradient()' is not supported on Gmail for the mobile web (versions 2022-12)                                                                                                                                                                                                                                                                                                      @react-email/no-unsupported-on-gmail-mobile-webmail
   77:21  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account                                                                                                                                                                           @react-email/no-partially-supported-on-gmail-android
   77:21  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account                                                                                                                                                                           @react-email/no-partially-supported-on-gmail-i-o-s
   97:21  warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
   97:21  warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
   97:21  warning  'color' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
   97:21  warning  'rgb()' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
   97:21  warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
   97:21  warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
   97:21  warning  'color' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
   97:21  warning  'rgb()' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
  132:15  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account                                                                                                                                                                           @react-email/no-partially-supported-on-gmail-android
  132:15  warning  'text-align' is only partially supported on Gmail for IOS (versions 2021-09).

Notes on its support:
- 2021-09:
  * Partial. Flow-relative values `start` and `end` are not supported with non Gmail account                                                                                                                                                                           @react-email/no-partially-supported-on-gmail-i-o-s
  134:15  warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
  134:15  warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
  134:15  warning  'color' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
  134:15  warning  'rgb()' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
  134:15  warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
  134:15  warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
  134:15  warning  'color' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
  134:15  warning  'rgb()' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
  171:3   warning  'display' is only partially supported on Gmail for IOS (versions 2021-12).

Notes on its support:
- 2021-12:
  * Partial. `flex`, `grid`, `flow-root`, `contents`, `inline flow-root`, `inline flex`, `inline grid`, `initial`, `revert`, `unset` are not supported with non Google accounts                                                                                           @react-email/no-partially-supported-on-gmail-android
  171:3   warning  'display: flex' is only partially supported on Gmail for IOS (versions 2020-11).

Notes on its support:
- 2020-11:
  * Not supported with non Google accounts                                                                                                                                                                                                                          @react-email/no-partially-supported-on-gmail-android
  171:3   warning  'display' is only partially supported on Gmail for IOS (versions 2021-12).

Notes on its support:
- 2021-12:
  * Partial. `flex`, `grid`, `flow-root`, `contents`, `inline flow-root`, `inline flex`, `inline grid`, `initial`, `revert`, `unset` are not supported with non Google accounts                                                                                           @react-email/no-partially-supported-on-gmail-i-o-s
  171:3   warning  'display: flex' is only partially supported on Gmail for IOS (versions 2020-11).

Notes on its support:
- 2020-11:
  * Not supported with non Google accounts                                                                                                                                                                                                                          @react-email/no-partially-supported-on-gmail-i-o-s
  172:3   error    'justify-content' is not supported on Gmail for Android (versions 2020-12)                                                                                                                                                                                                                                                                                                              @react-email/no-unsupported-on-gmail-android
  172:3   error    'justify-content' is not supported on Gmail for the web (versions 2020-12)                                                                                                                                                                                                                                                                                                              @react-email/no-unsupported-on-gmail-desktop-webmail
  172:3   error    'justify-content' is not supported on Gmail for Android (versions 2020-12)                                                                                                                                                                                                                                                                                                              @react-email/no-unsupported-on-gmail-i-o-s
  172:3   error    'justify-content' is not supported on Gmail for the mobile web (versions 2020-12)                                                                                                                                                                                                                                                                                                       @react-email/no-unsupported-on-gmail-mobile-webmail
  179:3   warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
  179:3   warning  'color' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
  179:3   warning  'color' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
  179:3   warning  'color' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
  181:3   warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
  181:3   warning  'rgb()' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
  181:3   warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
  181:3   warning  'rgb()' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail
  187:3   warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-android
  187:3   warning  'rgb()' is only partially supported on Gmail for the web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped               @react-email/no-partially-supported-on-gmail-desktop-webmail
  187:3   warning  'rgb()' is only partially supported on Gmail for IOS (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped                   @react-email/no-partially-supported-on-gmail-i-o-s
  187:3   warning  'rgb()' is only partially supported on Gmail for the mobile web (versions 2021-08).

Notes on its support:
- 2021-08:
  * Whitespace syntax is not supported (`rgb(0:128 0 / 1)`).
  * whitespace syntax (`rgb(0:128 0)`): when used in the `style` attribute of an element, the whole attribute is stripped. When used inside `<style>`, the whole `<style>` block is stripped        @react-email/no-partially-supported-on-gmail-mobile-webmail

✖ 50 problems (8 errors, 42 warnings)

@gabrielmfern gabrielmfern changed the title Feat/eslint plugin feat(packages): eslint plugin Nov 21, 2023
Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-email ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 4:43pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
react-email-demo ⬜️ Ignored (Inspect) Visit Preview Mar 26, 2024 4:43pm

…s with partial values on unknown and partial support
…sion of emails clients

Also refactor a bit of to have less duplication
let dataFromCanIEmail: SupportEntry[] | undefined;

try {
const fd = fs.openSync(caniemailCachedDataPath, "r");

Check failure

Code scanning / CodeQL

Insecure temporary file High

Insecure creation of file in
the os temp dir
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature approved from Discussions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant