Skip to content

Instantly share code, notes, and snippets.

View shettayyy's full-sized avatar

Rahul Shetty shettayyy

View GitHub Profile
@shettayyy
shettayyy / commitlint.config.js
Last active September 25, 2025 20:45
This configuration extends @commitlint/config-conventional with strict rules for commit formatting (type, scope, subject, body, footer). It enforces lowercase casing, specific type/scope enums, and line-length limits. The prompt section customizes the interactive commit wizard with descriptive messages, emojis, and guided questions, helping cont…
const CASE = "lower-case";
const config = {
defaultIgnores: true,
extends: ["@commitlint/config-conventional"],
prompt: {
messages: {
emptyWarning: "can not be empty",
lowerLimitWarning: "below limit",
max: "upper %d chars",
@shettayyy
shettayyy / starship.toml
Created August 2, 2024 03:12
Starship Config File
# Add this to ~/.config/ after installing starship via homebrew and initialising it in zsh
command_timeout = 1000
# ---
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = ""
@shettayyy
shettayyy / pre-commit-eslint
Last active December 10, 2021 05:27
Pre-commit hook for Linting JS with ESLint before commit.
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true