-
Notifications
You must be signed in to change notification settings - Fork 18
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
write a config for components with similar rules #51
Comments
To clarify, this allows a user to say, I want rule X to also apply to A, B, and C components. Is this correct @aubreyquinn ? |
Yep :) |
I also wonder if this will cover aliasing. e.g. import { Button as ImageButton } from "@fluent" We will want the user to be able to specify alternatives for component names. |
I think this will be complicated but definitely worth a try. I'll see if I can get in-file aliasing working but if they alias in one place and import the alias in a second place I don't think we'll be able to catch that. e.g. import { Button as ImageButton } from "fluent"
export Button; and then another file imports |
[like] Aubrey Quinn reacted to your message:
…________________________________
From: Ryan Lynch ***@***.***>
Sent: Monday, September 16, 2024 11:16:35 AM
To: microsoft/eslint-plugin-fluentui-jsx-a11y ***@***.***>
Cc: Author ***@***.***>; Comment ***@***.***>
Subject: Re: [microsoft/eslint-plugin-fluentui-jsx-a11y] write a config for components with similar rules (Issue #51)
I also wonder if this will cover aliasing. e.g.
import { Button as ImageButton } from ***@***.***<https://github.com/fluent>"
We will want the user to be able to specify alternatives for component names.
I think this will be complicated but definitely worth a try. I'll see if I can get in-file aliasing working but if they alias in one place and import the alias in a second place I don't think we'll be able to catch that.
e.g.
import { Button as ImageButton } from "fluent"
export Button;
and then another file imports Button from that file
—
Reply to this email directly, view it on GitHub<#51 (comment)> or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATJUBIKLCFVU55DIINWRLALZW24ZHBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE2TSNZQGAZDSNZRQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGE3DSNZZG4ZTGM5HORZGSZ3HMVZKMY3SMVQXIZI>.
You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Many components share the same accessibility rules such as TextArea and Input. It would be great to make a config like an array and to have the rules generic and could be applied to the list of component names in the config file. e.g. https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/rules/alt-text.js ```
const DEFAULT_ELEMENTS = [
'img',
'object',
'area',
'input[type="image"]',
];
The text was updated successfully, but these errors were encountered: