-
Notifications
You must be signed in to change notification settings - Fork 1
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
Import config from extension; group by plugin #255
Conversation
fregante
commented
Apr 7, 2024
•
edited
Loading
edited
- Add Shopify and JSDoc plugins from extension
- Import config from extension
- group by plugin
- Make typescript rules apply only to typescript files
@@ -25,6 +28,7 @@ module.exports = { | |||
"@typescript-eslint/no-unsafe-assignment": "off", | |||
"@typescript-eslint/no-unsafe-return": "off", | |||
"@typescript-eslint/no-non-null-assertion": "off", | |||
"react/jsx-key": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: disable this in tests
@@ -41,6 +41,12 @@ module.exports = [ | |||
selector: | |||
"ImportDeclaration[source.value=classnames] ImportDefaultSpecifier[local.name!=/cx/]", | |||
}, | |||
{ | |||
message: | |||
"Instead of `<div onClick/>`, use <UnstyledButton/> (`button` element) or <ClickableElement/> (accessible `div` element)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: updated description to suggest UnstyledButton
as well (which is always preferred)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also very Extension-specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The a11y plugin rules also apply on the app, so these 2 components help fix them correctly:
The only relation to the extension is that it lives in the @/components/*
folder. The app can use them freely, the other repos can copy-pasted them I suppose.
no-restricted-imports.js
Outdated
{ | ||
group: ["react-shadow/emotion"], | ||
message: | ||
'Use this instead: import EmotionShadowRoot from "@/components/EmotionShadowRoot"', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule is pretty Extension specific. I'm not sure if it makes sense to include in the shared config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, the app doesn't have any Shadow DOM. I'll move it back
Following the review in pixiebrix/eslint-config-pixiebrix#255 (comment)