Skip to content

📦 eslint & prettier -> biome #16

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
merged 1 commit into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .eslintrc.js

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
node-version: 20

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Lint & Format
run: yarn run check

- name: Test
run: yarn test
8 changes: 8 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"code_actions_on_format": {
"source.fixAll.biome": true,
"source.organizeImports.biome": true
},
"formatter": { "language_server": { "name": "biome" } },
"lsp": { "biome": { "settings": { "require_config_file": true } } }
}
74 changes: 1 addition & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1 @@
# Turborepo starter

This is an official Yarn v1 starter turborepo.

## What's inside?

This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:

### Apps and Packages

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

### Utilities

This turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting

### Build

To build all apps and packages, run the following command:

```
cd my-turborepo
yarn run build
```

### Develop

To develop all apps and packages, run the following command:

```
cd my-turborepo
yarn run dev
```

### Remote Caching

Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:

```
cd my-turborepo
npx turbo login
```

This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:

```
npx turbo link
```

## Useful Links

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
# truffle javascript SDK
8 changes: 3 additions & 5 deletions apps/truffle-webclient/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createGlobalStyle } from "styled-components";
import { LoginPage } from "./pages/LoginPage";
import { createGlobalStyle } from 'styled-components';
import { LoginPage } from './pages/LoginPage';

function App() {
export function App() {
return (
<>
<GlobalStyle />
Expand All @@ -10,8 +10,6 @@ function App() {
);
}

export default App;

const GlobalStyle = createGlobalStyle`
body {
margin: 0;
Expand Down
10 changes: 5 additions & 5 deletions apps/truffle-webclient/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ReactDOM from "react-dom/client";
import App from "./App";
import { StrictMode } from "react";
import { StrictMode } from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './App';

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<StrictMode>
<App />
</StrictMode>
</StrictMode>,
);
2 changes: 1 addition & 1 deletion apps/truffle-webclient/src/pages/LoginPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled, { createGlobalStyle } from "styled-components";
import styled from 'styled-components';

export const LoginPage = () => {
return (
Expand Down
6 changes: 3 additions & 3 deletions apps/truffle-webclient/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
});
52 changes: 52 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"linter": {
"rules": {
"all": true,
"complexity": {
"noExcessiveCognitiveComplexity": "off"
},
"correctness": {
"noUndeclaredDependencies": "off",
"useImportExtensions": "off"
},
"performance": {
"noAccumulatingSpread": "off"
},
"suspicious": {
"noConsole": {
"options": {
"allow": ["error", "debug", "info"]
},
"level": "error"
},
"noReactSpecificProps": "off"
},
"style": {
"useNamingConvention": "off",
"useBlockStatements": "off",
"useDefaultSwitchClause": "off",
"useFilenamingConvention": "off"
}
}
},
"files": {
"ignore": ["*.js"]
},
"formatter": {
"indentStyle": "space",
"lineWidth": 100,
"formatWithErrors": true
},
"javascript": {
"formatter": {
"quoteStyle": "single"
},
"globals": ["Bun"]
}
}
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@
"name": "truffle-javascript",
"version": "0.0.0",
"private": true,
"workspaces": [
"apps/*",
"packages/*"
],
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"test": "turbo run test",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"check": "biome check .",
"fix": "biome check . --fix",
"deploy:truffle-webclient": "scripts/deploy.sh truffle-webclient",
"publish-packages": "turbo run build lint test && changeset version && changeset publish"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@changesets/cli": "^2.26.0",
"eslint-config-custom": "*",
"prettier": "2.8.3",
"turbo": "1.7.3"
},
"engines": {
"node": ">=14.0.0"
"node": ">=20.0.0"
},
"dependencies": {},
"packageManager": "[email protected].19"
"packageManager": "[email protected].21"
}
4 changes: 0 additions & 4 deletions packages/eslint-config/index.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/eslint-config/package.json

This file was deleted.

11 changes: 3 additions & 8 deletions packages/truffle-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
"license": "MIT",
"scripts": {
"dev": "yarn build -- --watch",
"build": "tsup src/index.ts --format cjs --dts",
"test": "vitest run"
"build": "tsup src/index.ts --format cjs --dts"
},
"files": [
"dist/index.js",
"dist/index.d.ts"
],
"files": ["dist/index.js", "dist/index.d.ts"],
"keywords": [],
"dependencies": {
"error-stack-parser": "^2.1.4"
Expand All @@ -21,8 +17,7 @@
"happy-dom": "8.2.6",
"tsup": "6.5.0",
"typescript": "4.9.5",
"vite": "4.1.1",
"vitest": "0.28.4"
"vite": "4.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
73 changes: 0 additions & 73 deletions packages/truffle-browser/src/index.test.ts

This file was deleted.

Loading