-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update to latest sewing-kit #1344
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
"extends": [ | ||
"plugin:shopify/typescript", | ||
"plugin:shopify/react", | ||
"plugin:shopify/eslint-comments", | ||
"plugin:shopify/jest", | ||
"plugin:shopify/node", | ||
"plugin:shopify/polaris", | ||
|
@@ -28,13 +27,16 @@ | |
"allowBlockStart": false | ||
} | ||
], | ||
"babel/no-unused-expressions": "off", | ||
"import/named": "off", | ||
"import/no-named-as-default": "off", | ||
"react/button-has-type": "off", | ||
"react/no-array-index-key": "off", | ||
"react/jsx-fragments": ["error", "element"], | ||
"shopify/jsx-no-complex-expressions": "off", | ||
"shopify/jsx-prefer-fragment-wrappers": "off", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sometimes we want empty wrapping divs |
||
"shopify/no-ancestor-directory-import": "error", | ||
"shopify/react-prefer-private-members": "off", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sometimes we do actually want pubic functions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we should enable this and add an ignore whenever public is used, which is only in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's 36 violations currently, 1/3 of which are false positives warning about examples written in JS when you can't even use private members (bug raised: Shopify/web-configs#110), and many of the others seem related to legacy context stuff - subscribe/unsubscribe stuff. I don't know enough about the code they touch to know what should be private or not. I'd totally be open to reevaluating this in the future, but I don't want to touch them now :) |
||
"jsx-a11y/label-has-for": [ | ||
2, | ||
{ | ||
|
@@ -46,6 +48,7 @@ | |
], | ||
"jsx-a11y/no-autofocus": "off", | ||
"jsx-a11y/anchor-has-content": "off", | ||
"jsx-a11y/control-has-associated-label": "off", | ||
"jsx-a11y/role-supports-aria-props": "off", | ||
"jsx-a11y/mouse-events-have-key-events": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
|
@@ -56,20 +59,24 @@ | |
{ | ||
"files": ["**/*.test.{ts,tsx}"], | ||
"rules": { | ||
"jest/no-truthy-falsy": "off", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use isTruthy() / isFalsy() A LOT and I don't want to go and refactor everything |
||
"shopify/jsx-no-hardcoded-content": "off", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to check for hardcoded content to make sure we're using translated strings in our source, but we don't care about that in our tests and examples. |
||
"shopify/no-ancestor-directory-import": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["examples/**/*.js"], | ||
"rules": { | ||
"import/no-extraneous-dependencies": "off", | ||
"import/no-unresolved": "off" | ||
"import/no-unresolved": "off", | ||
"shopify/jsx-no-hardcoded-content": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["playground/Playground.tsx"], | ||
"rules": { | ||
"react/prefer-stateless-function": "off", | ||
"shopify/jsx-no-hardcoded-content": "off", | ||
"shopify/react-initialize-state": "off" | ||
} | ||
} | ||
|
This file was deleted.
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 doesn't seem to work in the way that I'd expect