Skip to content
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

chore: linting fixes #261

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

chore: linting fixes #261

wants to merge 2 commits into from

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Nov 28, 2024

Description

This pull request addresses general housekeeping tasks and linting. It focuses on improving TypeScript linting and formatting consistency across the codebase. Changes include:

  • Updated TypeScript linting configuration to include the stories folder and its files for design-tokens.
  • Ran prettier to apply consistent formatting across all affected files.

Related issues

Fixes: N/A

Manual testing steps

  1. Run yarn lint and ensure there are no TypeScript linting errors, including in the stories folder.
  2. Run yarn prettier to verify that all files adhere to the formatting rules.
  3. Open the affected stories in Storybook and confirm there are no regressions in functionality or display.

Pre-merge author checklist

Pre-merge reviewer checklist

  • Manually tested the PR to confirm no regressions.
  • Verified all linting and formatting changes.
  • Confirmed that the updates improve code maintainability.

@@ -3,10 +3,10 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Text, TextColor } from '@metamask/design-system-react';
import README from './Shadows.mdx';

interface ShadowSwatchProps {
type ShadowSwatchProps = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use type instead of interface

@@ -2,7 +2,7 @@ import React, { FunctionComponent } from 'react';
import { lightTheme } from '../../../src';
import { Text, TextVariant } from '@metamask/design-system-react';

interface ColorSwatchProps {
type ColorSwatchProps = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use type instead of interface

import { Text, TextVariant } from '@metamask/design-system-react';

interface ColorSwatchGroupProps {
type ColorSwatchGroupProps = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use type instead of interface

Comment on lines +6 to +7
"jsx": "react",
"types": ["react", "node", "jest"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs jsx and react for stories

Comment on lines +12 to +13
"stories/**/*.tsx",
"stories/**/*.ts"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Includes stories folder in typescript checks but does not include them in build because we are excluding storybook files in tsconfig.packages.build.json

@georgewrmarshall georgewrmarshall marked this pull request as ready for review November 29, 2024 08:01
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner November 29, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant