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

[Meta] Drop format, lint, check-format and check-lint commands, replace them with check and ci commands #2428

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Dec 5, 2024

Q A
Bug fix? no
New feature? no
Issues Fix #...
License MIT

Following #2423 (comment).

When I've migrated from ESLint and Prettier to Biome.js, I kept commands yarn lint, yarn format (and yarn check-) for historical and simplicity reasons, because it was two separate tools.

Now that we use a single tool, we can use its two dedicated commands:

  • biome check, like biome format + biome lint + imports sorting
  • biome ci, for the CI (it does not write files)
image

cc @chadyred

@carsonbot carsonbot added Bug Bug Fix Feature New Feature Status: Needs Review Needs to be reviewed labels Dec 5, 2024
@Kocal Kocal removed Bug Bug Fix Feature New Feature labels Dec 5, 2024
@chadyred
Copy link
Contributor

chadyred commented Dec 5, 2024

@Kocal Re, you are quicker than me I was doing make a PR, so great to see that :)

A little thing about the "--write", it sounds as a low level of details, I found the "--fix" shorter and it is more humanized...but the "--write" is the first accepted option and "--fix" is an alias...(My 🧠 swims too much with cs-fixer, maybe :D)

- `yarn run lint`: lint assets from the package,
- `yarn run format`: format assets from the package.
- `yarn run check`: run the formatter, linter, and sort imports, and fails if any modifications
- `yarn run check --write`: run the formatter, linter, imports sorting, and write modifications
Copy link
Contributor

Choose a reason for hiding this comment

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

I forgot to update the contributing guide 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Nah, don't worry that's fine :)

@Kocal Kocal force-pushed the yarn-biome-commands branch from 1a068f9 to 51f7478 Compare December 5, 2024 14:18
@Kocal
Copy link
Member Author

Kocal commented Dec 5, 2024

A little thing about the "--write", it sounds as a low level of details, I found the "--fix" shorter and it is more humanized...but the "--write" is the first accepted option and "--fix" is an alias...(My 🧠 swims too much with cs-fixer, maybe :D)

I understand your point, but I believe it can be the same scenario with --apply alias which was... deprecated some versions ago (I was not really happy to open Kocal/BiomeJsBundle#9 because of https://github.com/biomejs/biome/blob/main/CHANGELOG.md#180-2024-06-04, only one month after creating the bundle 😅)

Let's keep --write!

…ce them with check and ci commands

Co-authored-by: Florian Cellier <florian.cellier@sensiolabs.com>
@Kocal Kocal force-pushed the yarn-biome-commands branch from 51f7478 to 36d04ff Compare December 5, 2024 14:25
@Kocal
Copy link
Member Author

Kocal commented Dec 5, 2024

you are quicker than me I was doing make a PR, so great to see that :)

'just put you as co-author ;)

@chadyred
Copy link
Contributor

chadyred commented Dec 5, 2024

@Kocal so you are "--write" by XP, it is better ^^

@Kocal Kocal merged commit 7cd32bd into symfony:2.x Dec 5, 2024
63 checks passed
@Kocal Kocal deleted the yarn-biome-commands branch December 5, 2024 14:28
@smnandre
Copy link
Member

Is it possible to have "yarn run check" and "yarn run fix" ? If not i'll do my aliases :)

@Kocal
Copy link
Member Author

Kocal commented Dec 10, 2024

yarn run check --write ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants