diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f17ce4..3a10d3b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,15 @@ { - "typescript.enablePromptUseWorkspaceTsdk": true, - "typescript.inlayHints.variableTypes.enabled": true, - "typescript.inlayHints.variableTypes.suppressWhenTypeMatchesName": true, - "typescript.inlayHints.parameterTypes.enabled": true, - "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": true, - "typescript.inlayHints.parameterNames.enabled": "all", - "typescript.preferences.preferTypeOnlyAutoImports": true, - "typescript.tsdk": "./node_modules/typescript/lib" + "editor.codeActionsOnSave": { + "source.organizeImports.biome": "explicit", + "quickfix.biome": "explicit" + }, + "editor.defaultFormatter": "biomejs.biome", + "typescript.enablePromptUseWorkspaceTsdk": true, + "typescript.inlayHints.variableTypes.enabled": true, + "typescript.inlayHints.variableTypes.suppressWhenTypeMatchesName": true, + "typescript.inlayHints.parameterTypes.enabled": true, + "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": true, + "typescript.inlayHints.parameterNames.enabled": "all", + "typescript.preferences.preferTypeOnlyAutoImports": true, + "typescript.tsdk": "./node_modules/typescript/lib" } diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..5c77e3f --- /dev/null +++ b/biome.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.6.0/schema.json", + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "formatter": { + "formatWithErrors": true, + "indentStyle": "space" + } +} diff --git a/bun.lockb b/bun.lockb index 9cb292a..99e858e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 7fc9b3e..1bda9d2 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,11 @@ "build:types": "tsc -p tsconfig.build.json", "build": "bun build:lib && bun build:types", "lint": "npm run lint:lib && npm run lint:exports && npm run lint:package", - "lint:lib": "eslint --ext .ts src", + "lint:lib": "biome check src/*.ts", "lint:exports": "attw --pack . --ignore-rules no-resolution cjs-resolves-to-esm", "lint:package": "publint ." }, - "files": [ - "dist", - "package.json" - ], + "files": ["dist", "package.json"], "exports": { ".": { "types": "./dist/index.d.ts", @@ -27,38 +24,14 @@ }, "devDependencies": { "@arethetypeswrong/cli": "0.15.1", + "@biomejs/biome": "1.6.0", "@tsconfig/strictest": "2.0.3", - "@types/bun": "^1.0.5", - "@typescript-eslint/eslint-plugin": "7.2.0", - "@typescript-eslint/parser": "7.2.0", + "@types/bun": "1.0.8", "bun-types": "1.0.30", - "eslint": "8.57.0", "publint": "0.2.7", "typescript": "5.4.2" }, "publishConfig": { "registry": "https://npm.pkg.github.com" - }, - "eslintConfig": { - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/strict-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked" - ], - "plugins": [ - "@typescript-eslint" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": true, - "tsconfigRootDir": "." - }, - "root": true, - "rules": { - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/explicit-function-return-type": [ - "error" - ] - } } } diff --git a/src/Option.test.ts b/src/Option.test.ts index 97214cc..1ed26c7 100644 --- a/src/Option.test.ts +++ b/src/Option.test.ts @@ -1,4 +1,4 @@ -import { expect, test, mock, describe } from "bun:test"; +import { describe, expect, mock, test } from "bun:test"; import { Option } from "./Option.ts"; @@ -31,7 +31,7 @@ describe("Option", () => { const mapper = mock((value) => `