diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..29d550a --- /dev/null +++ b/biome.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", + "organizeImports": { + "enabled": true + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "ignore": ["main.js"], + "attributePosition": "auto", + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 80 + }, + "javascript": { + "formatter": { + "arrowParentheses": "always", + "bracketSameLine": false, + "bracketSpacing": true, + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "semicolons": "always", + "trailingComma": "es5" + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} diff --git a/package.json b/package.json index 7450b81..dabd800 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build2": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", "build": "webpack --mode production", "dev": "webpack --mode development --watch", - "format": "npx prettier --trailing-comma es5 --write .", + "format": "npx @biomejs/biome format --write .", "clean": "npx rimraf main.js", "test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} mocha -r ts-node/register 'tests/**/*.ts'" }, @@ -25,6 +25,7 @@ "author": "", "license": "Apache-2.0", "devDependencies": { + "@biomejs/biome": "1.7.3", "@microsoft/microsoft-graph-types": "^2.40.0", "@types/chai": "^4.3.14", "@types/chai-as-promised": "^7.1.8", @@ -44,7 +45,6 @@ "mocha": "^10.4.0", "npm-check-updates": "^16.14.20", "obsidian": "^1.5.7", - "prettier": "^3.2.5", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tslib": "^2.6.2",