-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from vite, prettier and eslint to rsbuild and biome
- Loading branch information
1 parent
e7db30d
commit 43239d4
Showing
42 changed files
with
202 additions
and
204 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,4 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", | ||
"extends": ["@repo/biome-config"] | ||
} |
This file contains 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 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,23 @@ | ||
import { defineConfig } from "@rsbuild/core"; | ||
import { pluginReact } from "@rsbuild/plugin-react"; | ||
|
||
export default defineConfig({ | ||
plugins: [pluginReact()], | ||
source: { | ||
entry: { | ||
main: "./src/main.tsx", | ||
}, | ||
}, | ||
html: { | ||
template: "./index.html", | ||
}, | ||
server: { | ||
port: 3000, | ||
headers: { | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Methods": "GET", | ||
"Access-Control-Allow-Headers": | ||
"X-Requested-With, content-type, Authorization", | ||
}, | ||
}, | ||
}); |
This file contains 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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,4 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", | ||
"extends": ["@repo/biome-config"] | ||
} |
This file contains 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 |
---|---|---|
@@ -1,10 +1,7 @@ | ||
module.exports = { | ||
// Type check TypeScript files | ||
"(apps|packages)/**/*.(ts|tsx)": () => "bun run type-check", | ||
"(apps|packages)/**/*.(ts|tsx)": () => "bun run check", | ||
|
||
// Lint then format TypeScript and JavaScript files | ||
"(apps|packages)/**/*.(ts|tsx|js)": (filenames) => [ | ||
`bunx eslint --fix ${filenames.join(" ")}`, | ||
`bunx prettier --write ${filenames.join(" ")}`, | ||
], | ||
"(apps|packages)/**/*.(ts|tsx|js)": "bun run format --staged", | ||
}; |
This file contains 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 |
---|---|---|
@@ -1,30 +1,25 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"prepare": "husky install", | ||
"prepare": "husky", | ||
"build": "turbo build", | ||
"changeset:release": "bun run build && changeset publish", | ||
"changeset:version": "changeset version && bun install --lockfile-only", | ||
"dev": "turbo dev", | ||
"type-check": "turbo run type-check", | ||
"lint": "turbo lint", | ||
"check": "turbo run check", | ||
"test": "turbo test", | ||
"test:coverage": "turbo run test:coverage", | ||
"format": "prettier --write \"**/*.{ts,tsx,md}\"", | ||
"format": "biome format --write", | ||
"dev:terminal": "turbo run dev --filter=evmcrispr-terminal" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.27.6", | ||
"eslint": "^8.57.0", | ||
"@repo/biome-config": "*", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.7", | ||
"prettier": "^3.2.5", | ||
"turbo": "^2.0.5" | ||
}, | ||
"name": "evmcrispr-monorepo", | ||
"packageManager": "bun@1.1.4", | ||
"workspaces": [ | ||
"apps/*", | ||
"packages/*" | ||
] | ||
"workspaces": ["apps/*", "packages/*"] | ||
} |
This file contains 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,111 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", | ||
"organizeImports": { | ||
"enabled": false | ||
}, | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 80, | ||
"attributePosition": "auto" | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": false, | ||
"complexity": { | ||
"noBannedTypes": "error", | ||
"noExtraBooleanCast": "error", | ||
"noMultipleSpacesInRegularExpressionLiterals": "error", | ||
"noUselessCatch": "error", | ||
"noUselessTypeConstraint": "error", | ||
"noWith": "error" | ||
}, | ||
"correctness": { | ||
"noConstAssign": "error", | ||
"noConstantCondition": "error", | ||
"noEmptyCharacterClassInRegex": "error", | ||
"noEmptyPattern": "error", | ||
"noGlobalObjectCalls": "error", | ||
"noInnerDeclarations": "error", | ||
"noInvalidConstructorSuper": "error", | ||
"noNewSymbol": "error", | ||
"noNonoctalDecimalEscape": "error", | ||
"noPrecisionLoss": "error", | ||
"noSelfAssign": "error", | ||
"noSetterReturn": "error", | ||
"noSwitchDeclarations": "error", | ||
"noUndeclaredVariables": "error", | ||
"noUnreachable": "error", | ||
"noUnreachableSuper": "error", | ||
"noUnsafeFinally": "error", | ||
"noUnsafeOptionalChaining": "error", | ||
"noUnusedLabels": "error", | ||
"noUnusedVariables": "error", | ||
"useArrayLiterals": "off", | ||
"useIsNan": "error", | ||
"useValidForDirection": "error", | ||
"useYield": "error" | ||
}, | ||
"style": { | ||
"noNamespace": "error", | ||
"noNonNullAssertion": "off", | ||
"useAsConstAssertion": "error", | ||
"useBlockStatements": "off" | ||
}, | ||
"suspicious": { | ||
"noAsyncPromiseExecutor": "error", | ||
"noCatchAssign": "error", | ||
"noClassAssign": "error", | ||
"noCompareNegZero": "error", | ||
"noControlCharactersInRegex": "error", | ||
"noDebugger": "error", | ||
"noDuplicateCase": "error", | ||
"noDuplicateClassMembers": "error", | ||
"noDuplicateObjectKeys": "error", | ||
"noDuplicateParameters": "error", | ||
"noEmptyBlockStatements": "off", | ||
"noExplicitAny": "off", | ||
"noExtraNonNullAssertion": "error", | ||
"noFallthroughSwitchClause": "error", | ||
"noFunctionAssign": "error", | ||
"noGlobalAssign": "error", | ||
"noImportAssign": "error", | ||
"noMisleadingCharacterClass": "error", | ||
"noMisleadingInstantiator": "error", | ||
"noPrototypeBuiltins": "error", | ||
"noRedeclare": "error", | ||
"noShadowRestrictedNames": "error", | ||
"noUnsafeDeclarationMerging": "error", | ||
"noUnsafeNegation": "error", | ||
"useGetterReturn": "error", | ||
"useValidTypeof": "error" | ||
} | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"], | ||
"linter": { | ||
"rules": { | ||
"correctness": { | ||
"noUndeclaredVariables": "off" | ||
}, | ||
"style": { | ||
"noArguments": "error", | ||
"noVar": "error", | ||
"useConst": "error" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains 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,12 @@ | ||
{ | ||
"name": "@repo/biome-config", | ||
"version": "0.0.0", | ||
"main": "biome.json", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@biomejs/biome": "^1.8.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.