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

Linting: Simplify config #28884

Merged
merged 7 commits into from
Aug 14, 2024
Merged

Linting: Simplify config #28884

merged 7 commits into from
Aug 14, 2024

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Aug 14, 2024

What I did

  • The ESlint config had duplications in it, and some sync fs code that can be eliminated.
  • I dealt with some minor inconsistencies caught after the simplification of the linter config.
  • Moved the .nx/cache directory to prevent our main storybook from reloading over and over again.
  • Add node:-prefix to os imports

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 76.3 MB 76.3 MB 0 B 1.22 0%
initSize 169 MB 169 MB 95.2 kB 4.65 0.1%
diffSize 92.6 MB 92.6 MB 95.2 kB 4.66 0.1%
buildSize 7.46 MB 7.46 MB -1.61 kB 4.18 0%
buildSbAddonsSize 1.61 MB 1.61 MB 17 B 2.16 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.3 MB 2.3 MB -1.52 kB 3.88 -0.1%
buildSbPreviewSize 350 kB 350 kB 0 B -4.36 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.46 MB 4.46 MB -1.5 kB 3.87 0%
buildPreviewSize 3 MB 3 MB -105 B 4.34 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 16.6s 25.3s 8.7s 1.36 🔺34.5%
generateTime 22.3s 19s -3s -315ms -0.66 -17.4%
initTime 25.7s 16.3s -9s -342ms -0.46 -57%
buildTime 12.5s 11.4s -1s -138ms -0.34 -10%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 8.2s 7.7s -526ms -0.64 -6.8%
devManagerResponsive 5.3s 5s -327ms -0.2 -6.5%
devManagerHeaderVisible 817ms 811ms -6ms -0.27 -0.7%
devManagerIndexVisible 860ms 819ms -41ms -0.53 -5%
devStoryVisibleUncached 1.1s 1.7s 587ms 2.06 🔺34.3%
devStoryVisible 854ms 853ms -1ms -0.35 -0.1%
devAutodocsVisible 776ms 852ms 76ms 0.97 8.9%
devMDXVisible 717ms 813ms 96ms 0.72 11.8%
buildManagerHeaderVisible 859ms 794ms -65ms 0.41 -8.2%
buildManagerIndexVisible 860ms 797ms -63ms 0.39 -7.9%
buildStoryVisible 902ms 1.2s 358ms 5.33 🔺28.4%
buildAutodocsVisible 802ms 1.1s 312ms 4.54 🔺28%
buildMDXVisible 784ms 689ms -95ms 0.2 -13.8%

Greptile Summary

This PR simplifies and standardizes ESLint configurations across the Storybook codebase, removing unnecessary rules and comments while maintaining essential linting checks.

  • Removed import/no-extraneous-dependencies rule from multiple .eslintrc.json files, including code/frameworks/experimental-nextjs-vite/.eslintrc.json and code/frameworks/nextjs/template/cli/.eslintrc.json
  • Deleted code/frameworks/angular/.eslintrc.js and added code/frameworks/angular/.eslintrc.json with specific type import rules
  • Removed ESLint disable comments for vitest/config imports in various vitest.config.ts files across different frameworks
  • Simplified code/core/.eslintrc.json by removing import/no-extraneous-dependencies rule
  • Added @types/cross-spawn as a dev dependency in code/core/package.json for improved TypeScript type checking

@ndelangen ndelangen self-assigned this Aug 14, 2024
@ndelangen ndelangen added build Internal-facing build tooling & test updates ci:normal labels Aug 14, 2024
Copy link

nx-cloud bot commented Aug 14, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b8235cb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

30 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

code/frameworks/angular/.eslintrc.js Outdated Show resolved Hide resolved
@ndelangen ndelangen merged commit 2b63fe5 into next Aug 14, 2024
56 checks passed
@ndelangen ndelangen deleted the norbert/cleanup-eslintconfig branch August 14, 2024 16:53
@github-actions github-actions bot mentioned this pull request Aug 15, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant