-
Notifications
You must be signed in to change notification settings - Fork 47
Add biome-config-godaddy
#1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kbader-godaddy
merged 5 commits into
godaddy:main
from
amarques-godaddy:add-biome-config
Oct 16, 2025
Merged
Add biome-config-godaddy
#1189
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
70697a5
Add biome-config-godaddy
amarques-godaddy 5717588
Replace tabs with spaces in biome-ts.json
amarques-godaddy 95dc975
Add changeset and remove unnecessary rules
amarques-godaddy 8799aaa
Add grit plugins back
amarques-godaddy 8c56f8d
Remove grit files
amarques-godaddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| "biome-config-godaddy": major | ||
| --- | ||
|
|
||
| Initial release of biome-config-godaddy, a fast Rust-based alternative to ESLint and Prettier configurations for GoDaddy JavaScript applications. | ||
|
|
||
| A comprehensive Biome configuration package that provides consistent code quality and formatting standards across GoDaddy's JavaScript ecosystem, featuring: | ||
|
|
||
| - **Dual configuration support** with dedicated configs for JavaScript (`biome.json`) and TypeScript (`biome-ts.json`) projects | ||
| - **Complete rule parity** with existing `eslint-config-godaddy` and `eslint-config-godaddy-typescript` standards, auto-migrated using Biome's migration tools | ||
| - **Consistent formatting rules** including 2-space indentation, 130 character line width, LF line endings, and single quote preferences | ||
| - **Performance optimizations** through Rust-based implementation providing significantly faster linting and formatting compared to traditional ESLint + Prettier setups | ||
| - **Biome 2.2.0+ compatibility** utilizing the latest linting rules for full feature parity with GoDaddy's established ESLint configurations | ||
| - **Seamless integration** designed for easy adoption in GoDaddy's monorepo ecosystem and existing JavaScript projects | ||
|
|
||
| This package enables development teams to maintain the same code quality standards and style guidelines established across GoDaddy's engineering organization while benefiting from improved build performance and reduced tooling complexity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| version: 0.0.0 | ||
| patterns: | ||
| - name: no_anonymous_functions | ||
| title: No Anonymous Functions | ||
| description: "Detects anonymous arrow functions with parentheses that use block statements and don't reference 'this'" | ||
| level: warn | ||
| tags: ["style", "debugging"] | ||
| - name: no_anonymous_single_param | ||
| title: No Anonymous Single Parameter Functions | ||
| description: "Detects single-parameter anonymous arrow functions that use block statements and don't reference 'this'" | ||
| level: warn | ||
| tags: ["style", "debugging"] | ||
| - name: no_anonymous_function_expressions | ||
| title: No Anonymous Function Expressions | ||
| description: "Detects traditional anonymous function expressions" | ||
| level: warn | ||
| tags: ["style", "debugging"] | ||
20 changes: 20 additions & 0 deletions
20
packages/biome-config-godaddy/.grit/no_anonymous_function_expressions.grit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Detect anonymous function expressions (function() {} and function(params) {}) | ||
| // Uses 'as $funcSig' to capture function signature for better span highlighting | ||
| or { | ||
| // Pattern for anonymous function with no parameters | ||
| `function() { $body }` as $funcSig where { | ||
amarques-godaddy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| register_diagnostic( | ||
| span = $funcSig, | ||
| message = "Anonymous function expressions should be assigned to a named variable or converted to named functions for better debugging", | ||
| severity = "warn" | ||
| ) | ||
| }, | ||
| // Pattern for anonymous function with parameters | ||
| `function($params) { $body }` as $funcSig where { | ||
amarques-godaddy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| register_diagnostic( | ||
| span = $funcSig, | ||
| message = "Anonymous function expressions should be assigned to a named variable or converted to named functions for better debugging", | ||
| severity = "warn" | ||
| ) | ||
| } | ||
| } | ||
10 changes: 10 additions & 0 deletions
10
packages/biome-config-godaddy/.grit/no_anonymous_functions.grit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Detect anonymous arrow functions with parentheses that use block statements (curly braces) | ||
| // Only flag them if they do NOT reference 'this' in the function body | ||
| `($args) => { $body }` where { | ||
| not $body <: contains `this`, | ||
| register_diagnostic( | ||
| span = $args, | ||
| message = "Anonymous arrow functions with block statements that don't reference 'this' should be converted to named function expressions for better debugging", | ||
amarques-godaddy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| severity = "warn" | ||
| ) | ||
| } | ||
10 changes: 10 additions & 0 deletions
10
packages/biome-config-godaddy/.grit/no_anonymous_single_param.grit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Detect single-parameter anonymous arrow functions that use block statements (curly braces) | ||
| // Only flag them if they do NOT reference 'this' in the function body | ||
| `$arg => { $body }` where { | ||
amarques-godaddy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| not $body <: contains `this`, | ||
| register_diagnostic( | ||
| span = $arg, | ||
| message = "Anonymous arrow functions with block statements that don't reference 'this' should be converted to named function expressions for better debugging", | ||
| severity = "warn" | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # biome-config-godaddy | ||
|
|
||
| ## 1.0.0 | ||
|
|
||
| ### Major Changes | ||
|
|
||
| - **Initial release** of biome-config-godaddy - A fast, Rust-based alternative to ESLint and Prettier configurations | ||
| - **Dual configuration support**: | ||
| - `biome.json` - Base configuration for JavaScript projects | ||
| - `biome-ts.json` - Enhanced configuration for TypeScript projects | ||
| - **Complete linting rule parity** with `eslint-config-godaddy` standards using Biome 2.2.0+ features | ||
| - **Consistent formatting rules**: | ||
| - 2-space indentation | ||
| - 130 character line width | ||
| - LF line endings | ||
| - Single quotes preference | ||
| - Automatic semicolon insertion | ||
| - **Performance optimizations**: Rust-based implementation provides 15x faster linting and formatting | ||
| - **Biome 2.2.0+ requirement**: Utilizes latest Biome features for full ESLint config compatibility | ||
| - **Monorepo integration**: Designed for seamless integration with GoDaddy's JavaScript tooling ecosystem | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.