Skip to content

Commit

Permalink
biome: fix json style
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchoz49 committed May 25, 2024
1 parent 7ee3f47 commit c8fba66
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 192 deletions.
Binary file removed .DS_Store
Binary file not shown.
20 changes: 10 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
}
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
204 changes: 112 additions & 92 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,94 +1,114 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"files": {
"ignore": ["tests/fastify/**", "types/**", "dist/**"]
},
"organizeImports": { "enabled": true },
"formatter": {
"enabled": true
},
"linter": {
"ignore": ["example.js"],
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessRename": "error",
"noUselessTernary": "error",
"noVoid": "error",
"noWith": "error",
"useLiteralKeys": "error",
"useRegexLiterals": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnusedVariables": "error",
"useIsNan": "error"
},
"security": { "noGlobalEval": "error" },
"style": {
"noCommaOperator": "error",
"noVar": "warn",
"useBlockStatements": "off",
"useConst": "error",
"useSingleVarDeclarator": "error"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConfusingLabels": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noSelfCompare": "error",
"noShadowRestrictedNames": "error",
"noUnsafeNegation": "error",
"useDefaultSwitchClauseLast": "error",
"useValidTypeof": "error"
}
}
},
"javascript": {
"globals": ["document", "navigator", "window"],
"formatter": {
"bracketSpacing": true,
"indentStyle": "space",
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"files": {
"ignore": [
"tests/fastify/**",
"types/**",
"dist/**"
]
},
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"ignore": [
"example.js"
],
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessRename": "error",
"noUselessTernary": "error",
"noVoid": "error",
"noWith": "error",
"useLiteralKeys": "error",
"useRegexLiterals": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnusedVariables": "error",
"useIsNan": "error"
},
"security": {
"noGlobalEval": "error"
},
"style": {
"noCommaOperator": "error",
"noVar": "warn",
"useBlockStatements": "off",
"useConst": "error",
"useSingleVarDeclarator": "error"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConfusingLabels": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noSelfCompare": "error",
"noShadowRestrictedNames": "error",
"noUnsafeNegation": "error",
"useDefaultSwitchClauseLast": "error",
"useValidTypeof": "error"
}
}
},
"javascript": {
"globals": [
"document",
"navigator",
"window"
],
"formatter": {
"bracketSpacing": true,
"quoteStyle": "single",
"semicolons": "asNeeded"
}
},
"json": {
"formatter": {
"lineWidth": 1
}
}
}
162 changes: 84 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,86 @@
{
"name": "@geut/fastify-uws",
"version": "3.1.1",
"description": "uWebSockets.js for fastify",
"type": "module",
"exports": {
".": {
"types": "./types/server.d.ts",
"import": "./src/server.js",
"require": "./dist/server.cjs"
},
"./plugin": {
"types": "./types/plugin.d.ts",
"import": "./src/plugin.js",
"require": "./dist/plugin.cjs"
},
"./package.json": "./package.json"
},
"workspaces": ["tests/fastify/module"],
"files": ["types", "dist", "src"],
"scripts": {
"start": "node index.js",
"build": "rm -rf dist && tsup src/server.js src/plugin.js --splitting",
"test": "uvu --ignore tests/fastify",
"posttest": "npm run lint && tsc",
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"prepublishOnly": "npm test && npm run build && npm run types",
"types": "node scripts/generate-dts.js"
},
"dependencies": {
"fastify-plugin": "^4.5.1",
"fastq": "^1.13.0",
"ipaddr.js": "^2.0.1",
"nanoerror": "^2.0.0",
"streamx": "^2.12.5",
"tempy": "^1.0.1",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.42.0"
},
"devDependencies": {
"@biomejs/biome": "^1.7.3",
"@fastify/static": "^7.0.3",
"@types/events": "^3.0.2",
"@types/node": "^20.8.10",
"@types/streamx": "^2.9.3",
"execa": "^8.0.1",
"fastify": "^4.24.3",
"require-inject": "^1.4.4",
"simple-get": "^4.0.1",
"tap": "^16.3.0",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"uvu": "^0.5.3",
"ws": "^8.9.0"
},
"standard": {
"env": ["node", "browser"],
"ignore": ["tests/fastify/**"]
},
"repository": {
"type": "git",
"url": "git+https://github.com/geut/fastify-uws.git"
},
"keywords": ["fastify", "uWebSockets.js", "fastify-plugin"],
"author": {
"name": "GEUT",
"email": "contact@geutstudio.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/geut/fastify-uws/issues"
},
"homepage": "https://github.com/geut/fastify-uws#readme",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=18"
}
"name": "@geut/fastify-uws",
"version": "3.1.1",
"description": "uWebSockets.js for fastify",
"type": "module",
"exports": {
".": {
"types": "./types/server.d.ts",
"import": "./src/server.js",
"require": "./dist/server.cjs"
},
"./plugin": {
"types": "./types/plugin.d.ts",
"import": "./src/plugin.js",
"require": "./dist/plugin.cjs"
},
"./package.json": "./package.json"
},
"workspaces": [
"tests/fastify/module"
],
"files": [
"types",
"dist",
"src"
],
"scripts": {
"start": "node index.js",
"build": "rm -rf dist && tsup src/server.js src/plugin.js --splitting",
"test": "uvu --ignore tests/fastify",
"posttest": "npm run lint && tsc",
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"prepublishOnly": "npm test && npm run build && npm run types",
"types": "node scripts/generate-dts.js"
},
"dependencies": {
"fastify-plugin": "^4.5.1",
"fastq": "^1.13.0",
"ipaddr.js": "^2.0.1",
"nanoerror": "^2.0.0",
"streamx": "^2.12.5",
"tempy": "^1.0.1",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.42.0"
},
"devDependencies": {
"@biomejs/biome": "^1.7.3",
"@fastify/static": "^7.0.3",
"@types/events": "^3.0.2",
"@types/node": "^20.8.10",
"@types/streamx": "^2.9.3",
"execa": "^8.0.1",
"fastify": "^4.24.3",
"require-inject": "^1.4.4",
"simple-get": "^4.0.1",
"tap": "^16.3.0",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"uvu": "^0.5.3",
"ws": "^8.9.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/geut/fastify-uws.git"
},
"keywords": [
"fastify",
"uWebSockets.js",
"fastify-plugin"
],
"author": {
"name": "GEUT",
"email": "contact@geutstudio.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/geut/fastify-uws/issues"
},
"homepage": "https://github.com/geut/fastify-uws#readme",
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=18"
}
}
Loading

0 comments on commit c8fba66

Please sign in to comment.