Skip to content

add format script - #1495

Merged
Andarist merged 2 commits into
changesets:mainfrom
marcalexiei:feat/format-script
Oct 10, 2024
Merged

Andarist merged 2 commits into
changesets:mainfrom
marcalexiei:feat/format-script

Conversation

@marcalexiei

Copy link
Copy Markdown
Contributor

Close #1492

  • Remove eslint-plugin-prettier, eslint-config-prettier is retained in the config to disable formatting rules
  • Rename lint:prettier script to format
  • Rename prettier script to format:fix
  • CI lint task renamed to lint_and_format, I think that there is no need to create a new job for just run format script
  • In eslintcrc I removed the packages/cli/default-files/config.js override since the folder no longer contains any js file

I also noticed that eslint-plugin-jest is not used, so I removed it from the dependencies.

Since the project is using jest I would consider to enable this plugin.
For instance, it includes a max-nested-describe rule that could resolve the describe "issue" reported in this review comment.

If you agree, I'm willing to work on a PR to achieve this,
Ideally I'll start working on it after #1467 is merged (it already change some test related code).

@changeset-bot

changeset-bot Bot commented Oct 10, 2024 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 240c6e4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Oct 10, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.04%. Comparing base (ccce743) to head (240c6e4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1495   +/-   ##
=======================================
  Coverage   81.04%   81.04%           
=======================================
  Files          54       54           
  Lines        2221     2221           
  Branches      657      661    +4     
=======================================
  Hits         1800     1800           
  Misses        417      417           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread package.json Resolved
@Andarist

Copy link
Copy Markdown
Member

Does format on save still work in VS Code and uses Prettier config to do its job?

@marcalexiei

Copy link
Copy Markdown
Contributor Author

Does format on save still work in VS Code and uses Prettier config to do its job?

Yes, of course! You just need to have prettier extension installed and select it as formatter


Also, let me know what do you think about eslint-plugin-jest usage proposal 🙂

@marcalexiei
marcalexiei requested a review from Andarist October 10, 2024 18:24
@Andarist

Copy link
Copy Markdown
Member

Also, let me know what do you think about #1495 (comment) 🙂

Yeah, this could be nice

@Andarist
Andarist merged commit 8ef697d into changesets:main Oct 10, 2024
@marcalexiei
marcalexiei deleted the feat/format-script branch October 10, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: prettier is running twice

2 participants