Skip to content

Commit

Permalink
style: applied lint and formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Sep 20, 2024
1 parent fe4a57d commit 50bc60a
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 227 deletions.
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": ["@r17x/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),
],
};
62 changes: 29 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
{
"name": "js",
"engines": {
"node": ">=20"
},
"workspaces": [
"unplugin/*",
"tooling/*",
"packages/*"
],
"repository": "[email protected]:r17x/js",
"author": "r17x <[email protected]>",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
"prepare": "husky",
"release": "yarn exec multi-semantic-release",
"test": "echo \"No test script specified\"",
"build": "echo \"No build script specified\"",
"lint": "run-s \"lint:*\"",
"lint:test": "echo \"No lint:test script specified\""
},
"lint-staged": {},
"dependencies": {
"@anolilab/multi-semantic-release": "^1.1.3",
"@biomejs/biome": "^1.9.2",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"commitlint-config-squash-pr": "^1.1.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"semantic-release": "^24.1.1"
}
"name": "js",
"engines": {
"node": ">=20"
},
"workspaces": ["unplugin/*", "tooling/*", "packages/*"],
"repository": "[email protected]:r17x/js",
"author": "r17x <[email protected]>",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
"prepare": "husky",
"release": "yarn exec multi-semantic-release",
"test": "echo \"No test script specified\"",
"build": "echo \"No build script specified\"",
"lint": "run-s \"lint:*\"",
"lint:test": "echo \"No lint:test script specified\""
},
"lint-staged": {},
"dependencies": {
"@anolilab/multi-semantic-release": "^1.1.3",
"@biomejs/biome": "^1.9.2",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"commitlint-config-squash-pr": "^1.1.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"semantic-release": "^24.1.1"
}
}
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": "@r17x/semantic-release"
"extends": "@r17x/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
}
}
}
38 changes: 18 additions & 20 deletions packages/biome/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"name": "@r17x/biome",
"description": "biomejs.dev configuration",
"version": "1.0.0",
"homepage": "https://github.com/r17x/js/tree/main/packages/biome",
"repository": {
"type": "git",
"url": "https://github.com/r17x/js.git",
"directory": "packages/biome"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module",
"files": [
"index.json"
],
"exports": {
".": "./index.json"
}
"name": "@r17x/biome",
"description": "biomejs.dev configuration",
"version": "1.0.0",
"homepage": "https://github.com/r17x/js/tree/main/packages/biome",
"repository": {
"type": "git",
"url": "https://github.com/r17x/js.git",
"directory": "packages/biome"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module",
"files": ["index.json"],
"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"
}
Loading

0 comments on commit 50bc60a

Please sign in to comment.