diff --git a/.changeset/blue-rooms-swim.md b/.changeset/blue-rooms-swim.md new file mode 100644 index 00000000..512a2888 --- /dev/null +++ b/.changeset/blue-rooms-swim.md @@ -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. diff --git a/README.md b/README.md index 4c478e08..518fff9e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # godaddy-style -Official GoDaddy JavaScript styleguide. It includes `eslint` packages for various use-cases and can be used as a standard in any new project. +Official GoDaddy JavaScript styleguide. It includes `eslint` and `biomejs` packages for various use-cases and can be used as a standard in any new project. - [`eslint-config-godaddy`]: Base configuration for _non-React_, ES6 JavaScript applications - [`eslint-config-godaddy-react`]: Configuration for ES6 React JavaScript applications - [`eslint-config-godaddy-typescript`]: Configuration for ES6 TypeScript applications - [`eslint-config-godaddy-react-typescript`]: Configuration for ES6 React JavaScript applications +- [`biome-config-godaddy`]: Fast Rust-based alternative to ESLint and Prettier using Biome There are many useful features: @@ -41,13 +42,18 @@ npm i eslint-config-godaddy-typescript --save-dev # OR (ES6 with React and TypeScript rules) npm i eslint-config-godaddy-react-typescript --save-dev + +# OR (BiomeJS with JS and TS rules available) +npm i biome-config-godaddy --save-dev ``` ## Usage -There are two ways to use this styleguide depending on your own tooling preference: directly using pre-included binaries or running `eslint` yourself with a custom `.eslintrc` config. +There are different ways to use this styleguide depending on your tooling preference and performance requirements. + +### ESLint Configuration -### 2. Define your local `eslint.config.js|mjs` and run `eslint` yourself +Define your local `eslint.config.js|mjs` and run `eslint` yourself: ``` js import GDConfig from 'eslint-config-godaddy'; @@ -73,6 +79,39 @@ The `--fix` option in `eslint` is [**only** available as a CLI option](https://g } ``` +### Biome Configuration + +For improved performance, use the Biome configuration. Create a `biome.json` file: + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome.json"] +} +``` + +For TypeScript projects: + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome-ts.json"] +} +``` + +Add these scripts to your `package.json`: + +```json +{ + "scripts": { + "lint": "biome lint .", + "lint:fix": "biome lint --write .", + "format": "biome format --write .", + "check": "biome check --write ." + } +} +``` + ## Additional Best Practices This section is a place for additional best practices that may be useful but are not strictly enforced by this styleguide. Have something to add here? Great! [Submit a PR](#how-do-i-contribute). @@ -174,5 +213,6 @@ No problem. Reach out to us by [opening an issue] [`eslint-config-godaddy-react`]: /packages/eslint-config-godaddy-react [`eslint-config-godaddy-typescript`]: /packages/eslint-config-godaddy-typescript [`eslint-config-godaddy-react-typescript`]: /packages/eslint-config-godaddy-react-typescript +[`biome-config-godaddy`]: /packages/biome-config-godaddy [changesets]: https://github.com/changesets/changesets [pnpm]: https://pnpm.io/ diff --git a/packages/biome-config-godaddy/CHANGELOG.md b/packages/biome-config-godaddy/CHANGELOG.md new file mode 100644 index 00000000..cc3fbca0 --- /dev/null +++ b/packages/biome-config-godaddy/CHANGELOG.md @@ -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 + diff --git a/packages/biome-config-godaddy/README.md b/packages/biome-config-godaddy/README.md new file mode 100644 index 00000000..79972f2a --- /dev/null +++ b/packages/biome-config-godaddy/README.md @@ -0,0 +1,220 @@ +# biome-config-godaddy + +Base Biome configuration for JavaScript applications officially used at GoDaddy. + +This configuration provides a fast, Rust-based alternative to ESLint and Prettier using [Biome][biome]. It implements the same linting and formatting standards as GoDaddy's ESLint configurations, ensuring consistency across projects while delivering superior performance. + +**Important**: This package requires Biome 2.2.0 or newer. The configuration utilizes the latest linting rules introduced in Biome 2.2.0 that provide feature parity with GoDaddy's ESLint configurations. Earlier versions of Biome will not support all the rules used in this configuration. + +Have a question or comment? [Open an issue!][issues] + +#### Example basic setup + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome.json"] +} +``` + +## Installation + +Install the package and its peer dependency using pnpm: + +```sh +pnpm install biome-config-godaddy @biomejs/biome --save-dev +``` + +Or with npm: + +```sh +npm install biome-config-godaddy @biomejs/biome --save-dev +``` + +## Configuration + +### Options + +This package provides two configuration files: + +- `biome.json` - Base configuration for JavaScript projects +- `biome-ts.json` - Enhanced configuration for TypeScript projects + +Both configurations include: + +- **Formatter settings**: 2-space indentation, 130 character line width, LF line endings +- **Linter rules**: Comprehensive rules aligned with `eslint-config-godaddy` standards +- **Fast performance**: Rust-based implementation for improved build times + +#### Example JavaScript project + +Create a `biome.json` file in your project root: + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome.json"] +} +``` + +#### Example TypeScript project + +For TypeScript projects, use the TypeScript-specific configuration: + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome-ts.json"] +} +``` + +#### Example with custom overrides + +Extend the base configuration and add project-specific rules: + +```json +{ + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "extends": ["biome-config-godaddy/biome.json"], + "linter": { + "rules": { + "suspicious": { + "noConsoleLog": "off" + }, + "style": { + "useNodejsImportProtocol": "error" + } + } + } +} +``` + +#### Example package.json scripts + +Add these scripts to your `package.json` for common development workflows: + +```json +{ + "scripts": { + "lint": "biome lint .", + "lint:fix": "biome lint --write .", + "format": "biome format --write .", + "format:check": "biome format .", + "check": "biome check --write .", + "check:ci": "biome check ." + } +} +``` + +## Commands + +### `format` command + +Formats all files in the current directory and subdirectories according to GoDaddy style rules. + +#### Example `format` usage + +```sh +# Format and write changes +biome format --write . + +# Check formatting without making changes +biome format . +``` + +### `lint` command + +Analyzes code for potential issues using GoDaddy's linting standards. + +#### Example `lint` usage + +```sh +# Lint all files +biome lint . + +# Lint with auto-fix +biome lint --write . + +# Lint specific files +biome lint src/**/*.js +``` + +### `check` command + +Combines linting and formatting in a single operation for comprehensive code quality checks. + +#### Example `check` usage + +```sh +# Check and fix all issues +biome check --write . + +# Dry run to see what would change +biome check . + +# Check specific directories +biome check src/ tests/ +``` + +## Lifecycles + +### `pre-commit` + +Integrate with Git hooks to ensure code quality before commits. + +#### Example `pre-commit` setup + +```json +{ + "scripts": { + "pre-commit": "biome check --write --staged" + } +} +``` + +### Continuous integration + +Validate code quality in CI pipelines without making changes. + +#### Example CI validation + +```json +{ + "scripts": { + "ci:lint": "biome check .", + "ci:format": "biome format ." + } +} +``` + +## How it works + +This Biome configuration mirrors the linting and formatting standards established by GoDaddy's ESLint configurations (`eslint-config-godaddy` and `eslint-config-godaddy-typescript`). Biome, written in Rust, provides the same code quality enforcement with improved performance compared to equivalent ESLint + Prettier setups. + +The configuration enforces GoDaddy's JavaScript style guide including 2-space indentation, 130-character line limits, consistent semicolon usage, and comprehensive linting rules for code correctness, complexity management, and style consistency. The formatter ensures consistent code appearance across all team members. + +Unlike traditional ESLint + Prettier combinations, Biome provides integrated linting and formatting in a single tool, eliminating configuration conflicts and reducing the number of dependencies in your project. The configuration automatically handles JavaScript and TypeScript files for different development environments. + +## Related Packages + +This Biome configuration is designed to be a drop-in replacement for GoDaddy's ESLint configurations: + +- [`eslint-config-godaddy`][eslint-base] - Base ESLint config (equivalent to `biome.json`) +- [`eslint-config-godaddy-typescript`][eslint-typescript] - ESLint config for TypeScript (equivalent to `biome-ts.json`) +- [`eslint-config-godaddy-react`][eslint-react] - ESLint config for React applications +- [`eslint-config-godaddy-react-typescript`][eslint-react-ts] - ESLint config for React with TypeScript + +Teams can migrate from ESLint configurations to Biome while maintaining the same code quality standards and style guidelines that GoDaddy has established across its engineering organization. + +## License + +[MIT][license] + +[biome]: https://biomejs.dev/ +[issues]: https://github.com/godaddy/javascript/issues/new +[license]: https://github.com/godaddy/javascript/blob/main/LICENSE +[eslint-base]: https://www.npmjs.com/package/eslint-config-godaddy +[eslint-typescript]: https://www.npmjs.com/package/eslint-config-godaddy-typescript +[eslint-react]: https://www.npmjs.com/package/eslint-config-godaddy-react +[eslint-react-ts]: https://www.npmjs.com/package/eslint-config-godaddy-react-typescript + diff --git a/packages/biome-config-godaddy/biome-ts.json b/packages/biome-config-godaddy/biome-ts.json new file mode 100644 index 00000000..cc4d4f6a --- /dev/null +++ b/packages/biome-config-godaddy/biome-ts.json @@ -0,0 +1,280 @@ +{ + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 130 + }, + "linter": { + "rules": { + "recommended": false, + "complexity": { + "noAdjacentSpacesInRegex": "error", + "noCommaOperator": "error", + "noExtraBooleanCast": "error", + "noUselessCatch": "error", + "noUselessEscapeInRegex": "error", + "noUselessLoneBlockStatements": "error", + "noUselessStringConcat": "error", + "noUselessTernary": "error", + "noUselessUndefinedInitialization": "error", + "useLiteralKeys": "error" + }, + "correctness": { + "noConstAssign": "error", + "noConstantCondition": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "error", + "noGlobalObjectCalls": "error", + "noInvalidBuiltinInstantiation": "error", + "noInvalidConstructorSuper": "error", + "noInvalidUseBeforeDeclaration": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noSelfAssign": "error", + "noSetterReturn": "error", + "noSwitchDeclarations": "error", + "noUndeclaredVariables": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnsafeOptionalChaining": "error", + "noUnusedLabels": "error", + "noUnusedPrivateClassMembers": "error", + "noUnusedVariables": "error", + "useIsNan": "error", + "useParseIntRadix": "error", + "useSingleJsDocAsterisk": "error", + "useValidForDirection": "error", + "useValidTypeof": "error", + "useYield": "error" + }, + "nursery": { + "noShadow": "warn", + "useMaxParams": "error" + }, + "security": { "noGlobalEval": "error" }, + "style": { + "noNestedTernary": "error", + "noUselessElse": "warn", + "noYodaExpression": "error", + "useArrayLiterals": "error", + "useCollapsedElseIf": "error", + "useConsistentBuiltinInstantiation": "error", + "useConst": "warn", + "useDefaultSwitchClause": "error", + "useThrowOnlyError": "error" + }, + "suspicious": { + "noAlert": "error", + "noAssignInExpressions": "error", + "noAsyncPromiseExecutor": "error", + "noBitwiseOperators": "error", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCompareNegZero": "error", + "noConfusingLabels": "error", + "noConsole": "warn", + "noConstantBinaryExpressions": "error", + "noControlCharactersInRegex": "error", + "noDebugger": "error", + "noDoubleEquals": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateElseIf": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noEmptyBlockStatements": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalAssign": "error", + "noImportAssign": "error", + "noIrregularWhitespace": "error", + "noMisleadingCharacterClass": "error", + "noOctalEscape": "error", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noSelfCompare": "error", + "noShadowRestrictedNames": "error", + "noSparseArray": "error", + "noUnsafeNegation": "error", + "noUselessRegexBackrefs": "error", + "noWith": "error", + "useGetterReturn": "error", + "useGuardForIn": "error" + } + } + }, + "javascript": { + "globals": [ + "onanimationend", + "exports", + "ongamepadconnected", + "onlostpointercapture", + "onanimationiteration", + "onkeyup", + "onmousedown", + "onanimationstart", + "onslotchange", + "onprogress", + "ontransitionstart", + "onpause", + "onended", + "onpointerover", + "onscrollend", + "onformdata", + "ontransitionrun", + "onanimationcancel", + "ondrag", + "onchange", + "onbeforeinstallprompt", + "onbeforexrselect", + "onmessage", + "ontransitioncancel", + "onpointerdown", + "onabort", + "onpointerout", + "oncuechange", + "ongotpointercapture", + "onscrollsnapchanging", + "onsearch", + "onsubmit", + "onstalled", + "onsuspend", + "onreset", + "onerror", + "onresize", + "onmouseenter", + "ongamepaddisconnected", + "ondragover", + "onbeforetoggle", + "onmouseover", + "onpagehide", + "onmousemove", + "onratechange", + "oncommand", + "onmessageerror", + "onwheel", + "ondevicemotion", + "onauxclick", + "ontransitionend", + "onpaste", + "onpageswap", + "ononline", + "ondeviceorientationabsolute", + "onkeydown", + "onclose", + "onselect", + "onpageshow", + "onpointercancel", + "onbeforematch", + "onpointerrawupdate", + "ondragleave", + "onscrollsnapchange", + "onseeked", + "onwaiting", + "onbeforeunload", + "onplaying", + "onvolumechange", + "ondragend", + "onstorage", + "onloadeddata", + "onfocus", + "onoffline", + "onplay", + "onafterprint", + "onclick", + "oncut", + "onmouseout", + "ondblclick", + "oncanplay", + "onloadstart", + "onappinstalled", + "onpointermove", + "ontoggle", + "oncontextmenu", + "onblur", + "oncancel", + "onbeforeprint", + "oncontextrestored", + "onloadedmetadata", + "onpointerup", + "onlanguagechange", + "oncopy", + "onselectstart", + "onscroll", + "onload", + "ondragstart", + "onbeforeinput", + "oncanplaythrough", + "oninput", + "oninvalid", + "ontimeupdate", + "ondurationchange", + "onselectionchange", + "onmouseup", + "location", + "onkeypress", + "onpointerleave", + "oncontextlost", + "ondrop", + "onsecuritypolicyviolation", + "oncontentvisibilityautostatechange", + "ondeviceorientation", + "onseeking", + "onrejectionhandled", + "onunload", + "onmouseleave", + "onhashchange", + "onpointerenter", + "onmousewheel", + "onunhandledrejection", + "ondragenter", + "onpopstate", + "onpagereveal", + "onemptied" + ], + "formatter": { + "quoteStyle": "single", + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "semicolons": "always", + "trailingCommas": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParentheses": "asNeeded" + } + }, + "json": { + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 130, + "trailingCommas": "none", + "bracketSpacing": true, + "expand": "auto" + }, + "linter": { + "enabled": true + }, + "assist": { + "enabled": false + } + }, + "overrides": [ + { + "includes": ["*.ts", "*.mts", "*.cts"], + "javascript": { "globals": [] }, + "linter": { + "rules": { + "correctness": { "noUnusedVariables": "error" }, + "nursery": { "noShadow": "off" } + } + } + } + ] +} diff --git a/packages/biome-config-godaddy/biome.json b/packages/biome-config-godaddy/biome.json new file mode 100644 index 00000000..a5272625 --- /dev/null +++ b/packages/biome-config-godaddy/biome.json @@ -0,0 +1,269 @@ +{ + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 130 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "complexity": { + "noAdjacentSpacesInRegex": "error", + "noCommaOperator": "error", + "noExtraBooleanCast": "error", + "noUselessCatch": "error", + "noUselessEscapeInRegex": "error", + "noUselessLoneBlockStatements": "error", + "noUselessStringConcat": "error", + "noUselessTernary": "error", + "noUselessUndefinedInitialization": "error", + "useLiteralKeys": "error" + }, + "correctness": { + "noConstAssign": "error", + "noConstantCondition": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "error", + "noGlobalObjectCalls": "error", + "noInvalidBuiltinInstantiation": "error", + "noInvalidConstructorSuper": "error", + "noInvalidUseBeforeDeclaration": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noSelfAssign": "error", + "noSetterReturn": "error", + "noSwitchDeclarations": "error", + "noUndeclaredVariables": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnsafeOptionalChaining": "error", + "noUnusedLabels": "error", + "noUnusedPrivateClassMembers": "error", + "noUnusedVariables": "error", + "useIsNan": "error", + "useParseIntRadix": "error", + "useSingleJsDocAsterisk": "error", + "useValidForDirection": "error", + "useValidTypeof": "error", + "useYield": "error" + }, + "nursery": { + "noShadow": "warn", + "useMaxParams": "error" + }, + "security": { "noGlobalEval": "error" }, + "style": { + "noNestedTernary": "error", + "noUselessElse": "warn", + "noYodaExpression": "error", + "useArrayLiterals": "error", + "useCollapsedElseIf": "error", + "useConsistentBuiltinInstantiation": "error", + "useConst": "warn", + "useDefaultSwitchClause": "error", + "useThrowOnlyError": "error" + }, + "suspicious": { + "noAlert": "error", + "noAssignInExpressions": "error", + "noAsyncPromiseExecutor": "error", + "noBitwiseOperators": "error", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCompareNegZero": "error", + "noConfusingLabels": "error", + "noConsole": "warn", + "noConstantBinaryExpressions": "error", + "noControlCharactersInRegex": "error", + "noDebugger": "error", + "noDoubleEquals": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateElseIf": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noEmptyBlockStatements": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalAssign": "error", + "noImportAssign": "error", + "noIrregularWhitespace": "error", + "noMisleadingCharacterClass": "error", + "noOctalEscape": "error", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noSelfCompare": "error", + "noShadowRestrictedNames": "error", + "noSparseArray": "error", + "noUnsafeNegation": "error", + "noUselessRegexBackrefs": "error", + "noWith": "error", + "useGetterReturn": "error", + "useGuardForIn": "error" + } + } + }, + "javascript": { + "globals": [ + "onanimationend", + "exports", + "ongamepadconnected", + "onlostpointercapture", + "onanimationiteration", + "onkeyup", + "onmousedown", + "onanimationstart", + "onslotchange", + "onprogress", + "ontransitionstart", + "onpause", + "onended", + "onpointerover", + "onscrollend", + "onformdata", + "ontransitionrun", + "onanimationcancel", + "ondrag", + "onchange", + "onbeforeinstallprompt", + "onbeforexrselect", + "onmessage", + "ontransitioncancel", + "onpointerdown", + "onabort", + "onpointerout", + "oncuechange", + "ongotpointercapture", + "onscrollsnapchanging", + "onsearch", + "onsubmit", + "onstalled", + "onsuspend", + "onreset", + "onerror", + "onresize", + "onmouseenter", + "ongamepaddisconnected", + "ondragover", + "onbeforetoggle", + "onmouseover", + "onpagehide", + "onmousemove", + "onratechange", + "oncommand", + "onmessageerror", + "onwheel", + "ondevicemotion", + "onauxclick", + "ontransitionend", + "onpaste", + "onpageswap", + "ononline", + "ondeviceorientationabsolute", + "onkeydown", + "onclose", + "onselect", + "onpageshow", + "onpointercancel", + "onbeforematch", + "onpointerrawupdate", + "ondragleave", + "onscrollsnapchange", + "onseeked", + "onwaiting", + "onbeforeunload", + "onplaying", + "onvolumechange", + "ondragend", + "onstorage", + "onloadeddata", + "onfocus", + "onoffline", + "onplay", + "onafterprint", + "onclick", + "oncut", + "onmouseout", + "ondblclick", + "oncanplay", + "onloadstart", + "onappinstalled", + "onpointermove", + "ontoggle", + "oncontextmenu", + "onblur", + "oncancel", + "onbeforeprint", + "oncontextrestored", + "onloadedmetadata", + "onpointerup", + "onlanguagechange", + "oncopy", + "onselectstart", + "onscroll", + "onload", + "ondragstart", + "onbeforeinput", + "oncanplaythrough", + "oninput", + "oninvalid", + "ontimeupdate", + "ondurationchange", + "onselectionchange", + "onmouseup", + "location", + "onkeypress", + "onpointerleave", + "oncontextlost", + "ondrop", + "onsecuritypolicyviolation", + "oncontentvisibilityautostatechange", + "ondeviceorientation", + "onseeking", + "onrejectionhandled", + "onunload", + "onmouseleave", + "onhashchange", + "onpointerenter", + "onmousewheel", + "onunhandledrejection", + "ondragenter", + "onpopstate", + "onpagereveal", + "onemptied" + ], + "formatter": { + "quoteStyle": "single", + "jsxQuoteStyle": "single", + "quoteProperties": "asNeeded", + "semicolons": "always", + "trailingCommas": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParentheses": "asNeeded" + } + }, + "json": { + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 130, + "trailingCommas": "none", + "bracketSpacing": true, + "expand": "auto" + }, + "linter": { + "enabled": true + }, + "assist": { + "enabled": false + } + } +} diff --git a/packages/biome-config-godaddy/package-lock.json b/packages/biome-config-godaddy/package-lock.json new file mode 100644 index 00000000..641dd768 --- /dev/null +++ b/packages/biome-config-godaddy/package-lock.json @@ -0,0 +1,182 @@ +{ + "name": "biome-config-godaddy", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "biome-config-godaddy", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "@biomejs/biome": "^2.2.5" + }, + "peerDependencies": { + "@biomejs/biome": ">= 2.2.0 < 3.0.0" + } + }, + "node_modules/@biomejs/biome": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.5.tgz", + "integrity": "sha512-zcIi+163Rc3HtyHbEO7CjeHq8DjQRs40HsGbW6vx2WI0tg8mYQOPouhvHSyEnCBAorfYNnKdR64/IxO7xQ5faw==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.2.5", + "@biomejs/cli-darwin-x64": "2.2.5", + "@biomejs/cli-linux-arm64": "2.2.5", + "@biomejs/cli-linux-arm64-musl": "2.2.5", + "@biomejs/cli-linux-x64": "2.2.5", + "@biomejs/cli-linux-x64-musl": "2.2.5", + "@biomejs/cli-win32-arm64": "2.2.5", + "@biomejs/cli-win32-x64": "2.2.5" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.5.tgz", + "integrity": "sha512-MYT+nZ38wEIWVcL5xLyOhYQQ7nlWD0b/4mgATW2c8dvq7R4OQjt/XGXFkXrmtWmQofaIM14L7V8qIz/M+bx5QQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.5.tgz", + "integrity": "sha512-FLIEl73fv0R7dI10EnEiZLw+IMz3mWLnF95ASDI0kbx6DDLJjWxE5JxxBfmG+udz1hIDd3fr5wsuP7nwuTRdAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.5.tgz", + "integrity": "sha512-5DjiiDfHqGgR2MS9D+AZ8kOfrzTGqLKywn8hoXpXXlJXIECGQ32t+gt/uiS2XyGBM2XQhR6ztUvbjZWeccFMoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.5.tgz", + "integrity": "sha512-5Ov2wgAFwqDvQiESnu7b9ufD1faRa+40uwrohgBopeY84El2TnBDoMNXx6iuQdreoFGjwW8vH6k68G21EpNERw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.5.tgz", + "integrity": "sha512-fq9meKm1AEXeAWan3uCg6XSP5ObA6F/Ovm89TwaMiy1DNIwdgxPkNwxlXJX8iM6oRbFysYeGnT0OG8diCWb9ew==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.5.tgz", + "integrity": "sha512-AVqLCDb/6K7aPNIcxHaTQj01sl1m989CJIQFQEaiQkGr2EQwyOpaATJ473h+nXDUuAcREhccfRpe/tu+0wu0eQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.5.tgz", + "integrity": "sha512-xaOIad4wBambwJa6mdp1FigYSIF9i7PCqRbvBqtIi9y29QtPVQ13sDGtUnsRoe6SjL10auMzQ6YAe+B3RpZXVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.5.tgz", + "integrity": "sha512-F/jhuXCssPFAuciMhHKk00xnCAxJRS/pUzVfXYmOMUp//XW7mO6QeCjsjvnm8L4AO/dG2VOB0O+fJPiJ2uXtIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + } + } +} diff --git a/packages/biome-config-godaddy/package.json b/packages/biome-config-godaddy/package.json new file mode 100644 index 00000000..c0193e68 --- /dev/null +++ b/packages/biome-config-godaddy/package.json @@ -0,0 +1,36 @@ +{ + "name": "biome-config-godaddy", + "version": "1.0.0", + "description": "Base Biome config for consistent style in JavaScript projects at GoDaddy.", + "license": "MIT", + "type": "module", + "scripts": { + "test": "echo ok", + "clean": "rimraf node_modules" + }, + "repository": { + "type": "git", + "url": "git@github.com:godaddy/javascript.git", + "directory": "packages/biome-config-godaddy" + }, + "keywords": [ + "godaddy", + "javascript", + "styleguide", + "style-guide", + "biome", + "biome-config", + "linter", + "formatter" + ], + "peerDependencies": { + "@biomejs/biome": ">= 2.2.0 < 3.0.0" + }, + "exports": { + "./biome.json": "./biome.json", + "./biome-ts.json": "./biome-ts.json" + }, + "devDependencies": { + "@biomejs/biome": "^2.2.5" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 439e3f18..a7c0f412 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,6 +48,12 @@ importers: specifier: ^5.8.3 version: 5.9.2 + packages/biome-config-godaddy: + devDependencies: + '@biomejs/biome': + specifier: ^2.2.5 + version: 2.2.5 + packages/eslint-config-godaddy: dependencies: eslint-plugin-jsdoc: @@ -220,6 +226,59 @@ packages: resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} + '@biomejs/biome@2.2.5': + resolution: {integrity: sha512-zcIi+163Rc3HtyHbEO7CjeHq8DjQRs40HsGbW6vx2WI0tg8mYQOPouhvHSyEnCBAorfYNnKdR64/IxO7xQ5faw==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@2.2.5': + resolution: {integrity: sha512-MYT+nZ38wEIWVcL5xLyOhYQQ7nlWD0b/4mgATW2c8dvq7R4OQjt/XGXFkXrmtWmQofaIM14L7V8qIz/M+bx5QQ==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@2.2.5': + resolution: {integrity: sha512-FLIEl73fv0R7dI10EnEiZLw+IMz3mWLnF95ASDI0kbx6DDLJjWxE5JxxBfmG+udz1hIDd3fr5wsuP7nwuTRdAg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@2.2.5': + resolution: {integrity: sha512-5Ov2wgAFwqDvQiESnu7b9ufD1faRa+40uwrohgBopeY84El2TnBDoMNXx6iuQdreoFGjwW8vH6k68G21EpNERw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@2.2.5': + resolution: {integrity: sha512-5DjiiDfHqGgR2MS9D+AZ8kOfrzTGqLKywn8hoXpXXlJXIECGQ32t+gt/uiS2XyGBM2XQhR6ztUvbjZWeccFMoQ==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@2.2.5': + resolution: {integrity: sha512-AVqLCDb/6K7aPNIcxHaTQj01sl1m989CJIQFQEaiQkGr2EQwyOpaATJ473h+nXDUuAcREhccfRpe/tu+0wu0eQ==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@2.2.5': + resolution: {integrity: sha512-fq9meKm1AEXeAWan3uCg6XSP5ObA6F/Ovm89TwaMiy1DNIwdgxPkNwxlXJX8iM6oRbFysYeGnT0OG8diCWb9ew==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@2.2.5': + resolution: {integrity: sha512-xaOIad4wBambwJa6mdp1FigYSIF9i7PCqRbvBqtIi9y29QtPVQ13sDGtUnsRoe6SjL10auMzQ6YAe+B3RpZXVg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@2.2.5': + resolution: {integrity: sha512-F/jhuXCssPFAuciMhHKk00xnCAxJRS/pUzVfXYmOMUp//XW7mO6QeCjsjvnm8L4AO/dG2VOB0O+fJPiJ2uXtIw==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@changesets/apply-release-plan@7.0.12': resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==} @@ -1830,6 +1889,41 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 + '@biomejs/biome@2.2.5': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 2.2.5 + '@biomejs/cli-darwin-x64': 2.2.5 + '@biomejs/cli-linux-arm64': 2.2.5 + '@biomejs/cli-linux-arm64-musl': 2.2.5 + '@biomejs/cli-linux-x64': 2.2.5 + '@biomejs/cli-linux-x64-musl': 2.2.5 + '@biomejs/cli-win32-arm64': 2.2.5 + '@biomejs/cli-win32-x64': 2.2.5 + + '@biomejs/cli-darwin-arm64@2.2.5': + optional: true + + '@biomejs/cli-darwin-x64@2.2.5': + optional: true + + '@biomejs/cli-linux-arm64-musl@2.2.5': + optional: true + + '@biomejs/cli-linux-arm64@2.2.5': + optional: true + + '@biomejs/cli-linux-x64-musl@2.2.5': + optional: true + + '@biomejs/cli-linux-x64@2.2.5': + optional: true + + '@biomejs/cli-win32-arm64@2.2.5': + optional: true + + '@biomejs/cli-win32-x64@2.2.5': + optional: true + '@changesets/apply-release-plan@7.0.12': dependencies: '@changesets/config': 3.1.1