Skip to content

Commit

Permalink
feat: added Commitlint configuration for Yarn
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #13
  • Loading branch information
RaulCatalinas committed May 10, 2024
1 parent d4979cb commit 934e180
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/constants/commitlint.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { PackageManager } from '@/types/package-manger'

// TODO: Add configuration for yarn
export const COMMITLINT_CONFIG: Record<PackageManager, string> = {
npm: 'npx --no -- commitlint --edit $1',
pnpm: 'pnpm dlx commitlint --edit $1',
yarn: '',
yarn: 'yarn dlx commitlint --edit $1',
bun: 'bunx commitlint --edit $1'
}
3 changes: 1 addition & 2 deletions src/constants/lint-staged.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { PackageManager } from '@/types/package-manger'

// TODO: Add configuration for yarn
export const LINT_STAGED_CONFIG: Record<PackageManager, string> = {
npm: 'npx lint-staged',
pnpm: 'pnpm dlx lint-staged',
yarn: '',
yarn: 'yarn dlx lint-staged',
bun: 'bunx lint-staged'
}
4 changes: 1 addition & 3 deletions src/utils/package-managers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export async function getPackageManger(): Promise<PackageManager> {
try {
const { packageManager } = await inquirer.prompt({
type: 'rawlist',
choices: PACKAGE_MANGERS.filter(
packageManager => packageManager !== 'yarn'
),
choices: PACKAGE_MANGERS,
message: 'Which package manager do you wanna use?',
name: 'packageManager'
})
Expand Down

0 comments on commit 934e180

Please sign in to comment.