From da5171473865d643deea0b3e8a37b81f561fd874 Mon Sep 17 00:00:00 2001 From: Lucas Alves Costa <50385918+luckasnix@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:52:31 -0300 Subject: [PATCH] chore: format on save with Biome (#63) --- .gitignore | 2 -- .nvmrc | 2 +- .releaserc | 36 ++++++++++++++++++------------------ .vscode/settings.json | 10 ++++++++++ LICENSE | 42 +++++++++++++++++++++--------------------- biome.json | 7 +------ package.json | 11 ++--------- 7 files changed, 53 insertions(+), 57 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index a547bf3..8b7e502 100644 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode/* -!.vscode/extensions.json .idea .DS_Store *.suo diff --git a/.nvmrc b/.nvmrc index cf7bc2e..6569dfa 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.8.1 +20.8.1 diff --git a/.releaserc b/.releaserc index e5ce632..9f1dc28 100644 --- a/.releaserc +++ b/.releaserc @@ -1,18 +1,18 @@ -{ - "branches": [ - { - "name": "main" - } - ], - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "angular" - } - ], - "@semantic-release/release-notes-generator", - "@semantic-release/github", - "@semantic-release/npm" - ] -} +{ + "branches": [ + { + "name": "main" + } + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "angular" + } + ], + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..02f9e4d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.formatOnSave": true, + "[json][typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "files.associations": { + ".releaserc": "json", + "LICENSE": "plaintext" + } +} diff --git a/LICENSE b/LICENSE index 6e2f022..77ebccc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2024 Lucas Alves Costa - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2024 Lucas Alves Costa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/biome.json b/biome.json index da4ca8e..915d766 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,7 @@ { "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "files": { - "ignore": ["node_modules/**", "dist/**"] + "ignore": [".husky/**", "dist/**", "node_modules/**"] }, "organizeImports": { "enabled": false @@ -19,10 +19,5 @@ "indentWidth": 2, "lineEnding": "lf", "lineWidth": 100 - }, - "json": { - "formatter": { - "enabled": false - } } } diff --git a/package.json b/package.json index 88f7618..e624d7e 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,8 @@ "default": "./dist/object-graph.js" } }, - "files": [ - "dist" - ], - "keywords": [ - "javascript", - "typescript", - "data structures", - "graph" - ], + "files": ["dist"], + "keywords": ["javascript", "typescript", "data structures", "graph"], "license": "MIT", "publishConfig": { "access": "public"