Skip to content

chore: disabling static color hex stylelint rule for specific files#23098

Merged
HowardBraham merged 4 commits intodevelopfrom
fix/disable-color-hex-lint
Feb 21, 2024
Merged

chore: disabling static color hex stylelint rule for specific files#23098
HowardBraham merged 4 commits intodevelopfrom
fix/disable-color-hex-lint

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Feb 21, 2024

Description

This PR addresses the need to refine our linting process by excluding specific files from the 'color-no-hex' rule, as outlined in Issue #23097. The motivation behind this change is to prevent lint warning blindness among developers by focusing on meaningful lint warnings that are relevant to the main application. By updating our lint configuration to ignore certain files where static hex color values are permissible, we aim to maintain the effectiveness of our linting process while acknowledging the unique requirements of standalone or external parts of our project.

Improvement/Solution

  • Updated the lint configuration to exclude specific files from the 'color-no-hex' rule.
  • Identified files where static hex color values are permissible due to their standalone nature or external usage.

Related issues

Fixes: #23097

Manual testing steps

  1. Pull this branch
  2. Run yarn lint
  3. Notice that there shouldn't be any static hex value warnings from stylelint

Screenshots/Recordings

Before

Below screencast shows warnings that should be ignored

before1080.mov

After

Below screencast shows no more stylelint warnings for static hex

after1080.mov

Linting still works as intended for other files

after.linting1080.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues.
  • I've included manual testing steps.
  • I’ve included tests if applicable.
  • I’ve documented my code using JSDoc format if applicable.
  • I’ve applied the right labels on the PR.
  • I’ve properly set the pull request status to "ready for review".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g., pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the issue it closes and includes the necessary testing evidence.

This PR template is filled out with a concise description of the changes, the motivation behind them, and the solution provided. It also includes a link to the related issue, outlines the manual testing steps, and adheres to the pre-merge checklists for both the author and the reviewer.

@georgewrmarshall georgewrmarshall added team-design-system All issues relating to design system in Extension needs-ux-ds-review labels Feb 21, 2024
@georgewrmarshall georgewrmarshall self-assigned this Feb 21, 2024
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@georgewrmarshall georgewrmarshall marked this pull request as ready for review February 21, 2024 18:34
@georgewrmarshall georgewrmarshall requested review from a team and kumavis as code owners February 21, 2024 18:34
@HowardBraham
Copy link
Copy Markdown
Contributor

This has been annoying me recently, so this is great!

But let's follow the conventions for giving a disable reason: https://eslint.org/docs/latest/use/configure/rules#comment-descriptions

@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

georgewrmarshall commented Feb 21, 2024

This has been annoying me recently, so this is great!

But let's follow the conventions for giving a disable reason: https://eslint.org/docs/latest/use/configure/rules#comment-descriptions

Great suggestion @HowardBraham! But unfortunately as we've discovered, our version of stylelint doesn't support comments in this way. I'll create an issue to upgrade stylelint in the extension #23099

Screenshot 2024-02-22 at 8 41 39 AM

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [4ced295]
Page Load Metrics (1944 ± 97 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1104221786631
domContentLoaded106424126
load14422292194420197
domInteractive106424126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@HowardBraham HowardBraham merged commit 4d2c1ff into develop Feb 21, 2024
@HowardBraham HowardBraham deleted the fix/disable-color-hex-lint branch February 21, 2024 22:55
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
@metamaskbot metamaskbot added the release-11.12.0 Issue or pull request that will be included in release 11.12.0 label Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.12.0 Issue or pull request that will be included in release 11.12.0 team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure Linting to Ignore Specific Files for 'color-no-hex' Rule

5 participants