diff --git a/biome.json b/biome.json new file mode 100644 index 0000000000..c822883752 --- /dev/null +++ b/biome.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.2.2/schema.json", + "files": { + "maxSize": 5242880, + "ignore": [ + "node_modules", + "bower_components", + "dist", + "bin", + "__testfixtures__", + "__fixtures__", + "packages/paste-icons/cjs", + "packages/paste-icons/esm", + "packages/paste-icons/json", + "packages/paste-theme-designer/public", + "packages/paste-theme-designer/out", + "packages/paste-token-contrast-checker/public", + ".cache", + ".next", + ".yarn", + "packages/**/dist/*", + "tsconfig.build.tsbuildinfo", + "**/*.d.ts", + ".codesandbox/ci.json", + "build.icon-list.js", + "**/*.hbs" + ] + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "suspicious": { + "noExplicitAny": "off" + } + } + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentSize": 2, + "lineWidth": 120 + }, + "javascript": { + "formatter": { + "indentStyle": "space", + "indentSize": 2, + "lineWidth": 120, + "quoteStyle": "single" + } + }, + "json": { + "formatter": { + "indentStyle": "space", + "indentSize": 2, + "lineWidth": 120 + } + } +} diff --git a/package.json b/package.json index cce76543af..c3f8f8203b 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.4", "@babel/types": "^7.21.4", + "@biomejs/biome": "1.2.2", "@changesets/changelog-github": "^0.2.8", "@changesets/cli": "^2.13.1", "@commitlint/cli": "16.2.1", diff --git a/yarn.lock b/yarn.lock index 84a6c0361a..d4c0d861dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4856,6 +4856,77 @@ __metadata: languageName: node linkType: hard +"@biomejs/biome@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/biome@npm:1.2.2" + dependencies: + "@biomejs/cli-darwin-arm64": 1.2.2 + "@biomejs/cli-darwin-x64": 1.2.2 + "@biomejs/cli-linux-arm64": 1.2.2 + "@biomejs/cli-linux-x64": 1.2.2 + "@biomejs/cli-win32-arm64": 1.2.2 + "@biomejs/cli-win32-x64": 1.2.2 + dependenciesMeta: + "@biomejs/cli-darwin-arm64": + optional: true + "@biomejs/cli-darwin-x64": + optional: true + "@biomejs/cli-linux-arm64": + optional: true + "@biomejs/cli-linux-x64": + optional: true + "@biomejs/cli-win32-arm64": + optional: true + "@biomejs/cli-win32-x64": + optional: true + bin: + biome: bin/biome + checksum: 36dfcc756c53e22a5f6b5819ebb261b02acaa4df2832ef00e231bf73d4707121d0acdefa81f12523beb09a7b363676ca8fe719873932794d2e92130c3a41908c + languageName: node + linkType: hard + +"@biomejs/cli-darwin-arm64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-darwin-arm64@npm:1.2.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@biomejs/cli-darwin-x64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-darwin-x64@npm:1.2.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@biomejs/cli-linux-arm64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-linux-arm64@npm:1.2.2" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@biomejs/cli-linux-x64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-linux-x64@npm:1.2.2" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@biomejs/cli-win32-arm64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-win32-arm64@npm:1.2.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@biomejs/cli-win32-x64@npm:1.2.2": + version: 1.2.2 + resolution: "@biomejs/cli-win32-x64@npm:1.2.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@changesets/apply-release-plan@npm:^4.0.0": version: 4.1.0 resolution: "@changesets/apply-release-plan@npm:4.1.0" @@ -38409,6 +38480,7 @@ fsevents@^1.2.7: "@babel/preset-react": ^7.18.6 "@babel/preset-typescript": ^7.21.4 "@babel/types": ^7.21.4 + "@biomejs/biome": 1.2.2 "@changesets/changelog-github": ^0.2.8 "@changesets/cli": ^2.13.1 "@commitlint/cli": 16.2.1