Skip to content

Commit 902c265

Browse files
authored
📦 eslint & prettier -> biome (#16)
1 parent e041015 commit 902c265

File tree

19 files changed

+177
-1166
lines changed

19 files changed

+177
-1166
lines changed

‎.eslintrc.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ jobs:
2121
- name: Setup Node.js environment
2222
uses: actions/setup-node@v3
2323
with:
24-
node-version: 16
25-
cache: "yarn"
24+
node-version: 20
2625

2726
- name: Install dependencies
2827
run: yarn
2928

3029
- name: Build
3130
run: yarn build
3231

32+
- name: Lint & Format
33+
run: yarn run check
34+
3335
- name: Test
3436
run: yarn test

‎.zed/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"code_actions_on_format": {
3+
"source.fixAll.biome": true,
4+
"source.organizeImports.biome": true
5+
},
6+
"formatter": { "language_server": { "name": "biome" } },
7+
"lsp": { "biome": { "settings": { "require_config_file": true } } }
8+
}

‎README.md

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1 @@
1-
# Turborepo starter
2-
3-
This is an official Yarn v1 starter turborepo.
4-
5-
## What's inside?
6-
7-
This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:
8-
9-
### Apps and Packages
10-
11-
- `docs`: a [Next.js](https://nextjs.org/) app
12-
- `web`: another [Next.js](https://nextjs.org/) app
13-
- `ui`: a stub React component library shared by both `web` and `docs` applications
14-
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
15-
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
16-
17-
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
18-
19-
### Utilities
20-
21-
This turborepo has some additional tools already setup for you:
22-
23-
- [TypeScript](https://www.typescriptlang.org/) for static type checking
24-
- [ESLint](https://eslint.org/) for code linting
25-
- [Prettier](https://prettier.io) for code formatting
26-
27-
### Build
28-
29-
To build all apps and packages, run the following command:
30-
31-
```
32-
cd my-turborepo
33-
yarn run build
34-
```
35-
36-
### Develop
37-
38-
To develop all apps and packages, run the following command:
39-
40-
```
41-
cd my-turborepo
42-
yarn run dev
43-
```
44-
45-
### Remote Caching
46-
47-
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.
48-
49-
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:
50-
51-
```
52-
cd my-turborepo
53-
npx turbo login
54-
```
55-
56-
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
57-
58-
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
59-
60-
```
61-
npx turbo link
62-
```
63-
64-
## Useful Links
65-
66-
Learn more about the power of Turborepo:
67-
68-
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
69-
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
70-
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
71-
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
72-
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
73-
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
1+
# truffle javascript SDK

‎apps/truffle-webclient/src/App.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { createGlobalStyle } from "styled-components";
2-
import { LoginPage } from "./pages/LoginPage";
1+
import { createGlobalStyle } from 'styled-components';
2+
import { LoginPage } from './pages/LoginPage';
33

4-
function App() {
4+
export function App() {
55
return (
66
<>
77
<GlobalStyle />
@@ -10,8 +10,6 @@ function App() {
1010
);
1111
}
1212

13-
export default App;
14-
1513
const GlobalStyle = createGlobalStyle`
1614
body {
1715
margin: 0;
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import ReactDOM from "react-dom/client";
2-
import App from "./App";
3-
import { StrictMode } from "react";
1+
import { StrictMode } from 'react';
2+
import ReactDOM from 'react-dom/client';
3+
import { App } from './App';
44

5-
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
5+
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
66
<StrictMode>
77
<App />
8-
</StrictMode>
8+
</StrictMode>,
99
);

‎apps/truffle-webclient/src/pages/LoginPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled, { createGlobalStyle } from "styled-components";
1+
import styled from 'styled-components';
22

33
export const LoginPage = () => {
44
return (
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react-swc'
1+
import react from '@vitejs/plugin-react-swc';
2+
import { defineConfig } from 'vite';
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7-
})
7+
});

‎biome.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"linter": {
9+
"rules": {
10+
"all": true,
11+
"complexity": {
12+
"noExcessiveCognitiveComplexity": "off"
13+
},
14+
"correctness": {
15+
"noUndeclaredDependencies": "off",
16+
"useImportExtensions": "off"
17+
},
18+
"performance": {
19+
"noAccumulatingSpread": "off"
20+
},
21+
"suspicious": {
22+
"noConsole": {
23+
"options": {
24+
"allow": ["error", "debug", "info"]
25+
},
26+
"level": "error"
27+
},
28+
"noReactSpecificProps": "off"
29+
},
30+
"style": {
31+
"useNamingConvention": "off",
32+
"useBlockStatements": "off",
33+
"useDefaultSwitchClause": "off",
34+
"useFilenamingConvention": "off"
35+
}
36+
}
37+
},
38+
"files": {
39+
"ignore": ["*.js"]
40+
},
41+
"formatter": {
42+
"indentStyle": "space",
43+
"lineWidth": 100,
44+
"formatWithErrors": true
45+
},
46+
"javascript": {
47+
"formatter": {
48+
"quoteStyle": "single"
49+
},
50+
"globals": ["Bun"]
51+
}
52+
}

‎package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,24 @@
22
"name": "truffle-javascript",
33
"version": "0.0.0",
44
"private": true,
5-
"workspaces": [
6-
"apps/*",
7-
"packages/*"
8-
],
5+
"workspaces": ["apps/*", "packages/*"],
96
"scripts": {
107
"build": "turbo run build",
118
"dev": "turbo run dev",
129
"test": "turbo run test",
13-
"lint": "turbo run lint",
14-
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
10+
"check": "biome check .",
11+
"fix": "biome check . --fix",
1512
"deploy:truffle-webclient": "scripts/deploy.sh truffle-webclient",
1613
"publish-packages": "turbo run build lint test && changeset version && changeset publish"
1714
},
1815
"devDependencies": {
16+
"@biomejs/biome": "^1.9.4",
1917
"@changesets/cli": "^2.26.0",
20-
"eslint-config-custom": "*",
21-
"prettier": "2.8.3",
2218
"turbo": "1.7.3"
2319
},
2420
"engines": {
25-
"node": ">=14.0.0"
21+
"node": ">=20.0.0"
2622
},
2723
"dependencies": {},
28-
"packageManager": "[email protected].19"
24+
"packageManager": "[email protected].21"
2925
}

0 commit comments

Comments
 (0)