Skip to content

Instantly share code, notes, and snippets.

@isimmons
Last active June 20, 2025 09:11
Show Gist options
  • Save isimmons/8e4f6c9c34ef68bc6606795535fabe40 to your computer and use it in GitHub Desktop.
Save isimmons/8e4f6c9c34ef68bc6606795535fabe40 to your computer and use it in GitHub Desktop.
biomejs config, v1 and v2, bound to change but is what I'm using ATM
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": true,
"ignore": []
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"nursery": {
"useSortedClasses": {
"level": "warn",
"fix": "safe",
"options": {
"attributes": ["className"],
"functions": ["cn", "clsx", "classNames"]
}
}
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"arrowParentheses": "always",
"trailingCommas": "all",
"semicolons": "asNeeded",
"bracketSpacing": true
}
}
}
{
"$schema": "https://biomejs.dev/schemas/2.0.0-beta/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": true,
"includes": ["src/**/*.ts"]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"nursery": {
"useSortedClasses": {
"level": "warn",
"fix": "safe",
"options": {
"attributes": ["className"],
"functions": ["cn", "clsx", "classNames"]
}
}
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"arrowParentheses": "always",
"trailingCommas": "all",
"semicolons": "asNeeded",
"bracketSpacing": true
}
}
}
@isimmons
Copy link
Author

Version 2 updates:

Intead of files.ignore, we use files.includes and use the '!' not operator for things we want to ignore.

"includes": ["src/**/*.ts", "!src/**/foofile.txt"]

Instead of organizeImports we can use assist

"assist": { "actions": { "source": { "organizeImports": "on" } } }

The docs are great. There is info on customizing how imports are organized and how the new default method organizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment