Skip to content

Commit

Permalink
chore: use biome
Browse files Browse the repository at this point in the history
  • Loading branch information
Songkeys committed Sep 12, 2023
1 parent 11afc80 commit be7d8e0
Show file tree
Hide file tree
Showing 112 changed files with 11,297 additions and 11,709 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"unocss.root": ["./examples/vite"],
"eslint.experimental.useFlatConfig": true,
"eslint.options": {
"overrideConfigFile": "./eslint.config.mjs"
}
"unocss.root": ["./examples/vite"],
"eslint.experimental.useFlatConfig": true,
"eslint.options": {
"overrideConfigFile": "./eslint.config.mjs"
}
}
32 changes: 32 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["./dist"]
},
"formatter": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"performance": {
"noDelete": "off"
},
"suspicious": {
"noExplicitAny": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingComma": "all",
"semicolons": "asNeeded"
}
},

"organizeImports": {
"enabled": true
}
}
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

48 changes: 24 additions & 24 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "vite",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"crossbell": "workspace:*",
"vue": "^3.3.4"
},
"devDependencies": {
"@unocss/reset": "^0.52.3",
"@unocss/transformer-directives": "^0.52.3",
"@vitejs/plugin-vue": "^4.2.3",
"@vueuse/core": "^10.1.2",
"typescript": "^5.0.4",
"unocss": "^0.52.3",
"vite": "^4.3.8",
"vue-tsc": "^1.6.5"
}
"name": "vite",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"crossbell": "workspace:*",
"vue": "^3.3.4"
},
"devDependencies": {
"@unocss/reset": "^0.52.3",
"@unocss/transformer-directives": "^0.52.3",
"@vitejs/plugin-vue": "^4.2.3",
"@vueuse/core": "^10.1.2",
"typescript": "^5.0.4",
"unocss": "^0.52.3",
"vite": "^4.3.8",
"vue-tsc": "^1.6.5"
}
}
4 changes: 2 additions & 2 deletions examples/vite/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@unocss/reset/tailwind.css'
import 'uno.css'
import { createApp } from 'vue'
import App from './App.vue'
import '@unocss/reset/tailwind.css'
import './style.css'
import 'uno.css'

createApp(App).mount('#app')
14 changes: 7 additions & 7 deletions examples/vite/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
6 changes: 3 additions & 3 deletions examples/vite/unocss.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
import transformerDirectives from '@unocss/transformer-directives'
import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'

export default defineConfig({
presets: [presetUno(), presetAttributify(), presetIcons()],
transformers: [transformerDirectives()],
presets: [presetUno(), presetAttributify(), presetIcons()],
transformers: [transformerDirectives()],
})
30 changes: 15 additions & 15 deletions examples/vite/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import path from 'node:path'
import { defineConfig, loadEnv } from 'vite'
import Vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import { defineConfig, loadEnv } from 'vite'

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
resolve: {
alias: {
crossbell: path.resolve(__dirname, '../../src/index.ts'),
},
},
define: {
'globalThis.process.env.CROSSBELL_RPC_ADDRESS': JSON.stringify(
env.CROSSBELL_RPC_ADDRESS,
),
},
plugins: [Vue(), UnoCSS()],
}
const env = loadEnv(mode, process.cwd(), '')
return {
resolve: {
alias: {
crossbell: path.resolve(__dirname, '../../src/index.ts'),
},
},
define: {
'globalThis.process.env.CROSSBELL_RPC_ADDRESS': JSON.stringify(
env.CROSSBELL_RPC_ADDRESS,
),
},
plugins: [Vue(), UnoCSS()],
}
})
177 changes: 86 additions & 91 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,88 @@
{
"name": "crossbell",
"version": "1.6.4",
"packageManager": "pnpm@8.7.0",
"description": "JavaScript SDK to interact with Crossbell",
"keywords": [
"crossbell",
"eth",
"contract",
"web3"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Crossbell-Box/crossbell.js/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Crossbell-Box/crossbell.js.git"
},
"files": [
"dist"
],
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./network": {
"types": "./dist/network.d.ts",
"require": "./dist/network.js",
"import": "./dist/network.mjs"
},
"./ipfs": {
"types": "./dist/ipfs.d.ts",
"require": "./dist/ipfs.js",
"import": "./dist/ipfs.mjs"
},
"./*": "./*"
},
"typesVersions": {
"*": {
"network": [
"./dist/network.d.ts"
],
"ipfs": [
"./dist/ipfs.d.ts"
]
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup --dts",
"docs:build": "typedoc",
"docs:preview": "serve docs",
"lint": "echo \"No linting configured\"",
"prepublishOnly": "npm run build",
"release": "bumpp",
"test": "vitest",
"typecheck": "tsc --noEmit",
"update-abi": "node ./scripts/update-abi.mjs",
"watch": "tsup --watch"
},
"dependencies": {
"@crossbell/ipfs-fetch": "^0.0.19",
"async-retry": "^1.3.3",
"eip1193-types": "^0.2.1",
"exponential-backoff": "^3.1.1",
"p-limit": "^3.1.0",
"viem": "^1.9.2"
},
"devDependencies": {
"@types/async-retry": "^1.4.5",
"@types/node": "^20.5.7",
"abitype": "^0.9.8",
"bumpp": "^9.2.0",
"change-case": "^4.1.2",
"eslint": "^8.48.0",
"prettier": "^3.0.3",
"tsup": "^7.2.0",
"typedoc": "^0.25.0",
"typescript": "^5.2.2",
"vitest": "^0.34.3"
},
"engines": {
"node": ">=16.14.0"
}
"name": "crossbell",
"private": true,
"version": "1.6.4",
"packageManager": "pnpm@8.7.0",
"description": "JavaScript SDK to interact with Crossbell",
"keywords": ["crossbell", "eth", "contract", "web3"],
"license": "MIT",
"bugs": {
"url": "https://github.com/Crossbell-Box/crossbell.js/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Crossbell-Box/crossbell.js.git"
},
"files": ["dist"],
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./network": {
"types": "./dist/network.d.ts",
"require": "./dist/network.js",
"import": "./dist/network.mjs"
},
"./ipfs": {
"types": "./dist/ipfs.d.ts",
"require": "./dist/ipfs.js",
"import": "./dist/ipfs.mjs"
},
"./*": "./*"
},
"typesVersions": {
"*": {
"network": ["./dist/network.d.ts"],
"ipfs": ["./dist/ipfs.d.ts"]
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup --dts",
"docs:build": "typedoc",
"docs:preview": "serve docs",
"format": "biome format . --write",
"lint": "biome check .",
"lint:fix": "biome check . --apply",
"prepublishOnly": "npm run build",
"release": "bumpp",
"test": "vitest",
"typecheck": "tsc --noEmit",
"update-abi": "node ./scripts/update-abi.mjs",
"watch": "tsup --watch"
},
"dependencies": {
"@crossbell/ipfs-fetch": "^0.0.19",
"async-retry": "^1.3.3",
"eip1193-types": "^0.2.1",
"exponential-backoff": "^3.1.1",
"p-limit": "^3.1.0",
"viem": "^1.10.9"
},
"devDependencies": {
"@biomejs/biome": "^1.1.2",
"@types/async-retry": "^1.4.5",
"@types/node": "^20.6.0",
"abitype": "^0.9.8",
"bumpp": "^9.2.0",
"change-case": "^4.1.2",
"simple-git-hooks": "^2.9.0",
"tsup": "^7.2.0",
"typedoc": "^0.25.1",
"typescript": "^5.2.2",
"vitest": "^0.34.4"
},
"engines": {
"node": ">=16.14.0"
},
"simple-git-hooks": {
"pre-commit": "bun run format && bun run lint:fix"
}
}
Loading

0 comments on commit be7d8e0

Please sign in to comment.