generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
chore: fixing eslint configuration #630
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
Draft
georgewrmarshall
wants to merge
1
commit into
main
Choose a base branch
from
fix/eslint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,174
−762
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,14 @@ | |
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that are set up within a monorepo. | ||
* | ||
* @param value | ||
*/ | ||
|
||
/** | ||
Check warning on line 11 in apps/storybook-react/.storybook/main.ts
|
||
* | ||
* @param value | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import React from 'react'; | ||
import '@metamask/design-tokens/src/css/index.css'; | ||
import '../tailwind.css'; | ||
|
||
import { Preview } from '@storybook/react'; | ||
import { StoryContext, StoryFn } from '@storybook/react'; | ||
import type { Preview } from '@storybook/react'; | ||
import type { StoryContext, StoryFn } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
export const globalTypes = { | ||
colorScheme: { | ||
|
@@ -22,13 +21,23 @@ | |
}, | ||
}; | ||
|
||
/** | ||
Check warning on line 24 in apps/storybook-react/.storybook/preview.tsx
|
||
* | ||
* @param Story | ||
* @param context | ||
*/ | ||
function withColorScheme(Story: StoryFn, context: StoryContext) { | ||
const storyColorScheme = context.parameters.colorScheme; | ||
const globalColorScheme = context.globals.colorScheme; | ||
|
||
// Use story-level parameter if available, otherwise fall back to global | ||
const colorScheme = storyColorScheme || globalColorScheme; | ||
|
||
/** | ||
Check warning on line 36 in apps/storybook-react/.storybook/preview.tsx
|
||
* | ||
* @param options0 | ||
* @param options0.children | ||
*/ | ||
function Wrapper({ | ||
children, | ||
...props | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 update to our linting step is required for ensuring that the Tailwind Prettier plugin operates correctly. By running
yarn workspace @metamask/design-system-tailwind-preset build
, we ensure that the Tailwind preset is built and its configuration is available. Without this step, the Tailwind Prettier plugin would fail to lint properly since it relies on the preset's configuration to validate styles accurately.Without this update our CI will fail at the linting step.
yarn lint
will also fail locally if the tailwind preset is not built.