-
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
Dependency updates #2326
Dependency updates #2326
Conversation
Fix linting issues raised by update to new version of eslint-plugin-shopify
@@ -19,9 +19,6 @@ export default function sewingKitConfig( | |||
plugins.jest((config: InitialOptions) => { | |||
config.roots = [join(__dirname, 'src'), join(__dirname, 'tests')]; | |||
|
|||
config.setupFiles.push(join(tests, 'setup.ts')); |
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.
Sewing-kit now automatically adds these files to the setupFiles and setupFilesAfterEnv blocks if they exist, so we don't need to be explict here.
@@ -7,9 +7,10 @@ import {useLink, LinkLikeComponentProps} from '../../utilities/link'; | |||
// but the props explorer isn't smart enough to work that out | |||
export interface UnstyledLinkProps extends LinkLikeComponentProps {} | |||
|
|||
// This does have a display name, but the linting has a bug in it | |||
// https://github.com/yannickcr/eslint-plugin-react/issues/2324 | |||
// eslint-disable-next-line react/display-name |
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.
Is this needed anymore?
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.
Yep, still needed. We're using eslint-plugin-eslint-comments which contains rules than trigger a warning when we've got a disable line that doesn't do anything, so if this was unneeded it would be flagged.
This issue has been resolved, and is in v7.15.0 but eslint-plugin-shopify depends up on v7.14.3 exactly.
On eslint-plugin-shopify's master branch that dependency has been bumped, so the next time theres a release of eslint-plugin-shopify this can be fixed up.
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.
Ok! Found it a bit strange that the eslint-disable-next-line was moved.
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.
There was a version bumb to eslint-plugin-react but not to the version we need - Now it raises a warning on both the React.memo and React.forwardRef - both of which are spurious.
Tbh there's no value in wrapping this in a memo anyway so I'm planning to remove that in a later PR.
WHY are these changes introduced?
Keeping up with latest, and unblocking storybook updates, as our old version of sewing-kit was preventing storybook updates
WHAT is this pull request doing?
Updates sewing-kit, updates storybook.
Code updates to pass linting as this included a new version of eslint-plugin-shopify
Linting fixes are mostly:
eslint-disable-next-line shopify/jest/no-if
lines as that no longer errors if your if statement is inside a function in a test.How to 🎩
Ensure lint, tests and type check all pass