Skip to content

Commit

Permalink
Add biome for JS formatting and linting.
Browse files Browse the repository at this point in the history
Note that this only covers the `script` directory, as #112 (comment) will remove the old build script.
  • Loading branch information
lgarron committed Sep 12, 2023
1 parent cce17fd commit c1ed15d
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ jobs:
- uses: actions/checkout@v2
- uses: ./.github/actions/bootstrap
- run: npm run build
- run: npm run lint
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/lgarron/Makefile-scripts

# Note: the first command becomes the default `make` target.
NPM_COMMANDS = build watch dev version postversion
NPM_COMMANDS = build watch dev version postversion lint format

.PHONY: $(NPM_COMMANDS)
$(NPM_COMMANDS):
Expand Down
13 changes: 13 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"formatter": {
"indentStyle": "space",
"indentSize": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

174 changes: 174 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@babel/core": "^7.10.5",
"@babel/preset-env": "^7.10.4",
"@babel/register": "^7.10.5",
"@biomejs/biome": "^1.1.2",
"bufferstreams": "^3.0.0",
"del": "^5.1.0",
"gulp": "^4.0.2",
Expand All @@ -22,7 +23,9 @@
"watch": "gulp watch",
"dev": "npm run watch",
"version": "npm run build",
"postversion": "git push --follow-tags [email protected]:cubing/icons.git HEAD:main && npm publish"
"postversion": "git push --follow-tags [email protected]:cubing/icons.git HEAD:main && npm publish",
"lint": "npx @biomejs/biome check ./script",
"format": "npx @biomejs/biome format --write ./script"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions script/stub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This is a stub until https://github.com/cubing/icons/pull/112 lands.

0 comments on commit c1ed15d

Please sign in to comment.