Skip to content

Commit

Permalink
style: applied biome
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Sep 20, 2024
1 parent c6eb65f commit 9e28d39
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 177 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
- name: install dependencies
run: yarn install --immutable

- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: yarn commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: yarn commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: lint
run: yarn lint

Expand Down
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@ri7nz/biome"]
}
17 changes: 10 additions & 7 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = {
extends: ["squash-pr", "@commitlint/config-conventional"],
ignores: [
// ignore lint commit when committed by release commit
(msg) => /^chore\((release|deps-dev|deps)?\):\s(@?\D+\d+.\d+.\d+|bump.*)\s(from|\[skip ci\]|to.*)?/g.test(msg),
// ignore lint commit when squash message
(msg) => /.*:.*\(#\d+\)/g.test(msg),
],
extends: ["squash-pr", "@commitlint/config-conventional"],
ignores: [
// ignore lint commit when committed by release commit
(msg) =>
/^chore\((release|deps-dev|deps)?\):\s(@?\D+\d+.\d+.\d+|bump.*)\s(from|\[skip ci\]|to.*)?/g.test(
msg,
),
// ignore lint commit when squash message
(msg) => /.*:.*\(#\d+\)/g.test(msg),
],
};
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"lint": "run-s \"lint:*\"",
"lint:test": "echo \"No lint:test script specified\""
},
"lint-staged": {},
"lint-staged": {
"*": [
"biome check --no-errors-on-unmatched --files-ignore-unknown=true --write"
]
},
"dependencies": {
"@anolilab/multi-semantic-release": "^1.1.3",
"@biomejs/biome": "^1.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/biome/.releaserc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@ri7nz/semantic-release"
"extends": "@ri7nz/semantic-release"
}
62 changes: 31 additions & 31 deletions packages/biome/index.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": [],
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"ignore": [],
"attributePosition": "auto",
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf"
},
"json": {
"formatter": {
"enabled": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": [],
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"ignore": [],
"attributePosition": "auto",
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf"
},
"json": {
"formatter": {
"enabled": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
22 changes: 11 additions & 11 deletions packages/biome/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@ri7nz/biome",
"description": "biomejs.dev configuration",
"version": "1.0.0",
"repository": "https://github.com/r17x/js",
"publishConfig": {
"access": "public"
},
"type": "module",
"exports": {
".": "./index.json"
}
"name": "@ri7nz/biome",
"description": "biomejs.dev configuration",
"version": "1.0.0",
"repository": "https://github.com/r17x/js",
"publishConfig": {
"access": "public"
},
"type": "module",
"exports": {
".": "./index.json"
}
}
2 changes: 1 addition & 1 deletion packages/semantic-release/.releaserc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "./index.json"
"extends": "./index.json"
}
204 changes: 102 additions & 102 deletions packages/semantic-release/index.json
Original file line number Diff line number Diff line change
@@ -1,104 +1,104 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "feature",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "style",
"section": "Styles",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.gitTag} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"successComment": false,
"failComment": false
}
]
]
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "feature",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "style",
"section": "Styles",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.gitTag} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"successComment": false,
"failComment": false
}
]
]
}
Loading

0 comments on commit 9e28d39

Please sign in to comment.