@openregion/biome-config 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -0
  3. package/biome.json +55 -0
  4. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Открытый регион
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # Biome shared config
2
+
3
+ Open Region shared configuration for [Biome](https://biomejs.dev/).
4
+
5
+ This package replaces `@openregion/eslint-config` and `@openregion/prettier-config` for projects that are ready to move to Biome. It is a new recommended baseline, not a rule-for-rule migration of the previous ESLint, Airbnb, React, TypeScript ESLint, JSX accessibility, or Prettier settings.
6
+
7
+ ## Installation
8
+
9
+ ```shell
10
+ npm install --save-dev @biomejs/biome @openregion/biome-config
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Create `biome.json` in the project root:
16
+
17
+ ```json
18
+ {
19
+ "extends": ["@openregion/biome-config"]
20
+ }
21
+ ```
22
+
23
+ Add scripts to the consumer project's `package.json`:
24
+
25
+ ```json
26
+ {
27
+ "scripts": {
28
+ "check": "biome check .",
29
+ "format": "biome check --write .",
30
+ "ci": "biome ci ."
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## Included baseline
36
+
37
+ - Biome formatter.
38
+ - Biome recommended linter rules.
39
+ - Import organization through Biome assist actions.
40
+ - Git ignore integration.
41
+ - Conservative Open Region defaults for JavaScript and TypeScript projects.
42
+
43
+ ## Migration from Open Region ESLint and Prettier configs
44
+
45
+ Remove the old packages:
46
+
47
+ ```shell
48
+ npm uninstall @openregion/eslint-config @openregion/prettier-config eslint prettier
49
+ ```
50
+
51
+ Install Biome and the shared config:
52
+
53
+ ```shell
54
+ npm install --save-dev @biomejs/biome @openregion/biome-config
55
+ ```
56
+
57
+ Add `biome.json`:
58
+
59
+ ```json
60
+ {
61
+ "extends": ["@openregion/biome-config"]
62
+ }
63
+ ```
64
+
65
+ When the project is ready to apply formatting and safe fixes, run:
66
+
67
+ ```shell
68
+ npx biome check --write .
69
+ ```
70
+
71
+ Review the resulting diff before committing. Biome formatter output can differ from Prettier, and recommended lint rules can surface findings that were not covered by the old shared configs.
72
+
73
+ ## Local package checks
74
+
75
+ ```shell
76
+ npm run check
77
+ npm run ci
78
+ npm run pack:dry-run
79
+ ```
package/biome.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "files": {
9
+ "includes": ["**", "!node_modules", "!dist", "!build", "!coverage"]
10
+ },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "indentStyle": "space",
14
+ "indentWidth": 2,
15
+ "lineWidth": 100
16
+ },
17
+ "javascript": {
18
+ "formatter": {
19
+ "quoteStyle": "single",
20
+ "semicolons": "always",
21
+ "trailingCommas": "all"
22
+ }
23
+ },
24
+ "json": {
25
+ "formatter": {
26
+ "trailingCommas": "none"
27
+ }
28
+ },
29
+ "assist": {
30
+ "enabled": true,
31
+ "actions": {
32
+ "source": {
33
+ "organizeImports": "on"
34
+ }
35
+ }
36
+ },
37
+ "linter": {
38
+ "enabled": true,
39
+ "rules": {
40
+ "preset": "recommended",
41
+ "style": {
42
+ "useImportType": "error",
43
+ "useNodejsImportProtocol": "warn"
44
+ },
45
+ "performance": {
46
+ "noReExportAll": "error"
47
+ },
48
+ "suspicious": {
49
+ "noBitwiseOperators": "warn",
50
+ "noConsole": "warn",
51
+ "noVar": "warn"
52
+ }
53
+ }
54
+ }
55
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@openregion/biome-config",
3
+ "version": "1.0.0",
4
+ "description": "Open Region shared Biome config",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "biome",
8
+ "biome-config",
9
+ "config",
10
+ "formatter",
11
+ "linter",
12
+ "javascript",
13
+ "typescript",
14
+ "styleguide"
15
+ ],
16
+ "homepage": "https://github.com/openregion/biome-config#readme",
17
+ "author": {
18
+ "name": "Alexander Kupriyanov",
19
+ "email": "kupriyanov.a@openregion.info"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/openregion/biome-config.git"
24
+ },
25
+ "type": "module",
26
+ "exports": {
27
+ ".": {
28
+ "biome": "./biome.json",
29
+ "default": "./biome.json"
30
+ }
31
+ },
32
+ "files": [
33
+ "biome.json",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "scripts": {
38
+ "check": "biome check .",
39
+ "ci": "biome ci . && npm run test:consumer",
40
+ "test:consumer": "node scripts/link-self.mjs && biome ci --config-path=tests/consumer-biome.json .",
41
+ "pack:dry-run": "npm pack --dry-run"
42
+ },
43
+ "peerDependencies": {
44
+ "@biomejs/biome": "^2.5.3"
45
+ },
46
+ "devDependencies": {
47
+ "@biomejs/biome": "2.5.3"
48
+ },
49
+ "packageManager": "npm@11.5.1"
50
+ }