Skip to content

Commit

Permalink
minor #2428 [Meta] Drop format, lint, check-format and check-lint com…
Browse files Browse the repository at this point in the history
…mands, replace them with check and ci commands (Kocal)

This PR was merged into the 2.x branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| 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`](https://biomejs.dev/reference/cli/#biome-check), like `biome format + biome lint + imports sorting`
- [`biome ci`](https://biomejs.dev/reference/cli/#biome-ci), for the CI (it does not write files)

<img width="1116" alt="image" src="https://github.com/user-attachments/assets/ea3481f8-308a-4a8a-a47f-53692c0a3488">

cc `@chadyred`

Commits
-------

36d04ff [Meta] Drop format, lint, check-format and check-lint commands, replace them with check and ci commands
  • Loading branch information
Kocal committed Dec 5, 2024
2 parents 4d298e8 + 36d04ff commit 7cd32bd
Show file tree
Hide file tree
Showing 22 changed files with 45 additions and 86 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --immutable
- run: yarn check-lint
- run: yarn check-format
- run: yarn ci

js-dist-current:
name: Check for UnBuilt JS Dist Files
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ To help you with assets, you can run the following commands in a specific packag
- `yarn run build`: build (compile) assets from the package,
- `yarn run watch`: watch for modifications and rebuild assets from the package,
- `yarn run test`: run the tests from the package,
- `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

Thanks to [Yarn Workspaces](https://yarnpkg.com/features/workspaces), you can also run these commands from the root directory of the project:
- `yarn run build`: build (compile) assets from **all** packages,
- `yarn run test`: run the tests from **all** packages,
- `yarn run lint`: lint assets from **all** packages,
- `yarn run format`: format assets from **all** packages,
- `yarn run check`: run the formatter, linter, and sort imports for **all** packages, and fails if any modifications
- `yarn run check --write`: run the formatter, linter, imports sorting for **all** packages, and write modifications

## Useful Git commands

Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"scripts": {
"build": "yarn workspaces foreach -Apt run build",
"test": "yarn workspaces foreach -Apt run test",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand Down
6 changes: 2 additions & 4 deletions src/Autocomplete/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Chartjs/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Cropperjs/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Dropzone/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/LazyImage/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/LiveComponent/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Map/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"importmap": {
Expand Down
6 changes: 2 additions & 4 deletions src/Map/src/Bridge/Google/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"build": "node ../../../../../../bin/build_package.js .",
"watch": "node ../../../../../../bin/build_package.js . --watch",
"test": "../../../../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Map/src/Bridge/Leaflet/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"build": "node ../../../../../../bin/build_package.js .",
"watch": "node ../../../../../../bin/build_package.js . --watch",
"test": "../../../../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Notify/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/React/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/StimulusBundle/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"needsPackageAsADependency": false,
Expand Down
6 changes: 2 additions & 4 deletions src/Svelte/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Swup/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/TogglePassword/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Translator/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"importmap": {
Expand Down
6 changes: 2 additions & 4 deletions src/Turbo/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Typed/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down
6 changes: 2 additions & 4 deletions src/Vue/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
"test": "../../../bin/test_package.sh .",
"lint": "biome lint --write",
"format": "biome format --write",
"check-lint": "biome lint",
"check-format": "biome format"
"check": "biome check",
"ci": "biome ci"
},
"symfony": {
"controllers": {
Expand Down

0 comments on commit 7cd32bd

Please sign in to comment.