Skip to content

Commit

Permalink
Merge pull request #11 from ize-302/develop
Browse files Browse the repository at this point in the history
chore: biome init ♻️
  • Loading branch information
ize-302 authored Sep 13, 2024
2 parents cc749f3 + f122449 commit e5fa98f
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 179 deletions.
36 changes: 36 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 2
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
Binary file modified bun.lockb
Binary file not shown.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"scripts": {
"build": "bun run build.mjs",
"prepublishOnly": "bun run build",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"lint": "bunx @biomejs/biome check src",
"lint:fix": "bun lint --write"
},
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -41,6 +43,7 @@
"shelljs": "^0.8.5"
},
"devDependencies": {
"@biomejs/biome": "1.9.0",
"@types/bun": "latest",
"@types/prompts": "^2.4.9",
"@types/shelljs": "^0.8.15",
Expand Down
22 changes: 11 additions & 11 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node
import meow from "meow";
import FLAGS from "@/constants/flags.js";
import { handleCommand } from "@/utils/handleCommand.js";
import meow from "meow";

const cli = meow(
`
`
Usage
$ gitmo [option] [command]
Options
Expand All @@ -14,15 +14,15 @@ const cli = meow(
Examples
$ gitmo -c
`,
{
importMeta: import.meta,
flags: {
[FLAGS.COMMIT]: { type: "boolean", shortFlag: "c" },
[FLAGS.HELP]: { type: "boolean", shortFlag: "h" },
[FLAGS.UPDATE]: { type: "boolean", shortFlag: "u" },
[FLAGS.VERSION]: { type: "boolean", shortFlag: "v" },
},
}
{
importMeta: import.meta,
flags: {
[FLAGS.COMMIT]: { type: "boolean", shortFlag: "c" },
[FLAGS.HELP]: { type: "boolean", shortFlag: "h" },
[FLAGS.UPDATE]: { type: "boolean", shortFlag: "u" },
[FLAGS.VERSION]: { type: "boolean", shortFlag: "v" },
},
},
);

handleCommand(cli);
110 changes: 55 additions & 55 deletions src/commit-types.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
[
{
"name": "feat",
"emoji": "",
"description": "A new feature"
},
{
"name": "fix",
"emoji": "🐛",
"description": "A bug Fix"
},
{
"name": "docs",
"emoji": "📚",
"description": "Documentation only changes"
},
{
"name": "style",
"emoji": "💄",
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"
},
{
"name": "refactor",
"emoji": "📦",
"description": "A code change that neither fixes a bug nor adds a feature"
},
{
"name": "perf",
"emoji": "🚀",
"description": "A code change that improves performance"
},
{
"name": "test",
"emoji": "🚨",
"description": "Adding missing tests or correcting existing tests"
},
{
"name": "ci",
"emoji": "⚙️",
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)"
},
{
"name": "build",
"emoji": "🛠",
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)"
},
{
"name": "chore",
"emoji": "♻️",
"description": "Other changes that don't modify src or test files"
},
{
"name": "revert",
"emoji": "🗑",
"description": "Reverts a previous commit"
}
{
"name": "feat",
"emoji": "",
"description": "A new feature"
},
{
"name": "fix",
"emoji": "🐛",
"description": "A bug Fix"
},
{
"name": "docs",
"emoji": "📚",
"description": "Documentation only changes"
},
{
"name": "style",
"emoji": "💄",
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"
},
{
"name": "refactor",
"emoji": "📦",
"description": "A code change that neither fixes a bug nor adds a feature"
},
{
"name": "perf",
"emoji": "🚀",
"description": "A code change that improves performance"
},
{
"name": "test",
"emoji": "🚨",
"description": "Adding missing tests or correcting existing tests"
},
{
"name": "ci",
"emoji": "⚙️",
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)"
},
{
"name": "build",
"emoji": "🛠",
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)"
},
{
"name": "chore",
"emoji": "♻️",
"description": "Other changes that don't modify src or test files"
},
{
"name": "revert",
"emoji": "🗑",
"description": "Reverts a previous commit"
}
]
12 changes: 6 additions & 6 deletions src/constants/flags.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const FLAGS = Object.freeze({
COMMIT: 'commit',
HELP: 'help',
UPDATE: 'update',
VERSION: 'version',
})
COMMIT: "commit",
HELP: "help",
UPDATE: "update",
VERSION: "version",
});

export default FLAGS
export default FLAGS;
Loading

0 comments on commit e5fa98f

Please sign in to comment.