From e0297d90fb4569805309d8c06a27947839577ab1 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 21 Jun 2024 15:51:56 +0200 Subject: [PATCH] feat: add biomejs --- .woodpecker/.test.yml | 1 + biome.json | 2 +- package-lock.json | 156 ++++++++++++++++++++++++++++++++++++++++++ package.json | 5 +- 4 files changed, 162 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.test.yml b/.woodpecker/.test.yml index 9715e1c..ab737f9 100644 --- a/.woodpecker/.test.yml +++ b/.woodpecker/.test.yml @@ -5,4 +5,5 @@ steps: image: node:20 commands: - npm ci + - npx @biomejs/biome ci ./src - npm test \ No newline at end of file diff --git a/biome.json b/biome.json index dfba4a9..c5c0e93 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.8.1/schema.json", + "$schema": "https://biomejs.dev/schemas/1.8.2/schema.json", "organizeImports": { "enabled": false }, diff --git a/package-lock.json b/package-lock.json index a01cd02..9784415 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "winston": "^3.8.2" }, "devDependencies": { + "@biomejs/biome": "1.8.2", "@vercel/ncc": "^0.34.0", "chai": "^4.3.6", "copy-webpack-plugin": "^11.0.0", @@ -515,6 +516,161 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.8.2.tgz", + "integrity": "sha512-XafCzLgs0xbH0bCjYKxQ63ig2V86fZQMq1jiy5pyLToWk9aHxA8GAUxyBtklPHtPYZPGEPOYglQHj4jyfUp+Iw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "1.8.2", + "@biomejs/cli-darwin-x64": "1.8.2", + "@biomejs/cli-linux-arm64": "1.8.2", + "@biomejs/cli-linux-arm64-musl": "1.8.2", + "@biomejs/cli-linux-x64": "1.8.2", + "@biomejs/cli-linux-x64-musl": "1.8.2", + "@biomejs/cli-win32-arm64": "1.8.2", + "@biomejs/cli-win32-x64": "1.8.2" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.2.tgz", + "integrity": "sha512-l9msLsTcSIAPqMsPIhodQmb50sEfaXPLQ0YW4cdj6INmd8iaOh/V9NceQb2366vACTJgcWDQ2RzlvURek1T68g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.2.tgz", + "integrity": "sha512-Fc4y/FuIxRSiB3TJ+y27vFDE/HJt4QgBuymktsIKEcBZvnKfsRjxvzVDunccRn4xbKgepnp+fn6BoS+ZIg/I3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.2.tgz", + "integrity": "sha512-Q99qwP0qibkZxm2kfnt37OxeIlliDYf5ogi3zX9ij2DULzc+KtPA9Uj0wCljcJofOBsBYaHc7597Q+Bf/251ww==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.2.tgz", + "integrity": "sha512-WpT41QJJvkZa1eZq0WmD513zkC6AYaMI39HJKmKeiUeX2NZirG+bxv1YRDhqkns1NbBqo3+qrJqBkPmOW+xAVA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.2.tgz", + "integrity": "sha512-bjhhUVFchFid2gOjrvBe4fg8BShcpyFQTHuB/QQnfGxs1ddrGP30yq3fHfc6S6MoCcz9Tjd3Zzq1EfWfyy5iHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.2.tgz", + "integrity": "sha512-rk1Wj4d3LIlAlIAS1m2jlyfOjkNbuY1lfwKvWIAeZC51yDMzwhRD7cReE5PE+jqLDtq60PX38hDPeKd7nA1S6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.2.tgz", + "integrity": "sha512-EUbqmCmNWT5xhnxHrCAEBzJB1AnLqxTYoRjlxiCMzGvsy5jQzhCanJ8CT9kNsApW3pfPWBWkoTa7qrwWmwnEGA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.2.tgz", + "integrity": "sha512-n9H5oRUCk1uNezMgyJh9+hZdtfD8PXLLeq8DUzTycIhl0I1BulIoZ/uxWgRVDFDwAR1JHu1AykISCRFNGnc4iA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", diff --git a/package.json b/package.json index 2e266b7..28aeee2 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "winston": "^3.8.2" }, "devDependencies": { + "@biomejs/biome": "1.8.2", "@vercel/ncc": "^0.34.0", "chai": "^4.3.6", "copy-webpack-plugin": "^11.0.0", @@ -55,9 +56,11 @@ "build:server": "ncc build ./src/index.js -o dist", "build:static": "webpack --config webpack.config.js --env static=true --env mode=production", "build:static:dev": "webpack --config webpack.config.js --env static=true --env mode=development", - "lint": "npm run standard:check", + "lint": "npm run standard:check & npm run biome:check", "standard:check": "standard ./src", "standard:fix": "standard --fix ./src", + "biome:check": "npx @biomejs/biome check ./src", + "biome:fix": "npx @biomejs/biome check --apply ./src", "license:check": "license-check-and-add check", "license:add": "license-check-and-add add", "license:remove": "license-check-and-add remove"