@crowdin/apps-biome-config 0.0.0-stage → 1.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 1.1.0
4
+
5
+ Import sorting is off. It moved imports with side effects, such as Sentry setup, below the code that must run after them.
6
+
7
+ ## 1.0.0
8
+
9
+ First release.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) crowdin
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 CHANGED
@@ -1,3 +1,79 @@
1
- # Temporary Holding Version
1
+ # @crowdin/apps-biome-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared [Biome](https://biomejs.dev) configuration for Crowdin apps.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ npm install --save-dev @crowdin/apps-biome-config
9
+ ```
10
+
11
+ Biome is a pinned peer dependency and installs with this package. Do not add `@biomejs/biome` separately.
12
+
13
+ With pnpm, add to `pnpm-workspace.yaml`:
14
+
15
+ ```yaml
16
+ publicHoistPattern:
17
+ - '@biomejs/biome'
18
+ ```
19
+
20
+ pnpm does not link the `biome` command of a peer dependency that it installs automatically. Hoisting links it and lets editor extensions find Biome.
21
+
22
+ `biome.json`:
23
+
24
+ ```json
25
+ {
26
+ "$schema": "./node_modules/@crowdin/apps-biome-config/schema.json",
27
+ "extends": ["@crowdin/apps-biome-config/biome"]
28
+ }
29
+ ```
30
+
31
+ `package.json` scripts:
32
+
33
+ ```json
34
+ {
35
+ "lint": "biome check --error-on-warnings",
36
+ "lint-fix": "biome check --write",
37
+ "prepare": "husky || true"
38
+ }
39
+ ```
40
+
41
+ In CI, run `biome ci --error-on-warnings`: the same check as `lint`.
42
+
43
+ ### Pre-commit hook
44
+
45
+ Formats and fixes staged files on every commit, also when an AI agent makes the commit.
46
+
47
+ ```sh
48
+ npm install --save-dev husky
49
+ ```
50
+
51
+ `.husky/pre-commit`:
52
+
53
+ ```sh
54
+ biome check --write --staged --no-errors-on-unmatched
55
+ git update-index --again
56
+ ```
57
+
58
+ `|| true` in `prepare` keeps installs without dev dependencies, such as production Docker images, from failing.
59
+
60
+ ## Settings
61
+
62
+ Only settings that differ from Biome's defaults. Each one needs a reason here.
63
+
64
+ | Setting | Value | Biome default | Why |
65
+ | --------------------------------------- | -------- | ------------- | ------------------------------------------------------------------------------------------------------- |
66
+ | `vcs.useIgnoreFile` | `true` | `false` | Skips what `.gitignore` skips. |
67
+ | `files.ignoreUnknown` | `true` | `false` | No errors on unsupported file types. |
68
+ | `formatter.indentStyle` | `space` | `tab` | Same look in every editor and review tool. |
69
+ | `formatter.lineWidth` | 120 | 80 | Room for TypeScript signatures, still fits side-by-side diffs. |
70
+ | `javascript.formatter.quoteStyle` | `single` | `double` | No escaping in strings that contain HTML, JSON or quoted text. |
71
+ | `assist.actions.source.organizeImports` | `off` | `on` | Sorting moves imports with side effects, such as Sentry setup, below the code that must run after them. |
72
+ | `linter.rules.style.useThrowOnlyError` | `error` | off | Throwing a string or object loses the stack trace. |
73
+ | `yaml.formatter.enabled` | `false` | `true` | Helm chart templates are not valid YAML until rendered; formatting breaks `{{ }}` expressions. |
74
+ | `css.parser.tailwindDirectives` | `true` | `false` | Parses Tailwind at-rules such as `@theme` and `@apply`. |
75
+ | `--error-on-warnings` (CI) | on | off | Warnings that never fail the build get ignored. |
76
+
77
+ ## License
78
+
79
+ [MIT](LICENSE)
package/biome.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.6.8/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "files": {
9
+ "ignoreUnknown": true
10
+ },
11
+ "formatter": {
12
+ "indentStyle": "space",
13
+ "lineWidth": 120
14
+ },
15
+ "javascript": {
16
+ "formatter": {
17
+ "quoteStyle": "single"
18
+ }
19
+ },
20
+ "css": {
21
+ "parser": {
22
+ "tailwindDirectives": true
23
+ }
24
+ },
25
+ "yaml": {
26
+ "formatter": {
27
+ "enabled": false
28
+ }
29
+ },
30
+ "assist": {
31
+ "actions": {
32
+ "source": {
33
+ "organizeImports": "off"
34
+ }
35
+ }
36
+ },
37
+ "linter": {
38
+ "rules": {
39
+ "style": {
40
+ "useThrowOnlyError": "error"
41
+ }
42
+ }
43
+ }
44
+ }
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@crowdin/apps-biome-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "Shared Biome configuration for Crowdin apps",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/crowdin/apps-biome-config.git"
9
+ },
10
+ "homepage": "https://github.com/crowdin/apps-biome-config#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/crowdin/apps-biome-config/issues"
13
+ },
14
+ "author": {
15
+ "name": "Andrii Bodnar",
16
+ "url": "https://github.com/andrii-bodnar/"
17
+ },
18
+ "keywords": [
19
+ "crowdin",
20
+ "crowdin-apps",
21
+ "biome",
22
+ "biome-config",
23
+ "lint",
24
+ "format"
25
+ ],
26
+ "files": [
27
+ "biome.json",
28
+ "schema.json",
29
+ "CHANGELOG.md"
30
+ ],
31
+ "exports": {
32
+ "./biome": "./biome.json"
33
+ },
34
+ "scripts": {
35
+ "lint": "biome check --error-on-warnings",
36
+ "lint-fix": "biome check --write",
37
+ "prepack": "node -e \"require('fs').copyFileSync(require.resolve('@biomejs/biome/configuration_schema.json'),'schema.json')\""
38
+ },
39
+ "peerDependencies": {
40
+ "@biomejs/biome": "2.6.8"
41
+ },
42
+ "devDependencies": {
43
+ "@biomejs/biome": "2.6.8"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "packageManager": "pnpm@11.20.0+sha512.9a6f330a95b66446ea088faf1521405a8a01f07fde7124cc9958dfed52d4bb436737e65b08f85f37b46fcba375092558ac51262b816844b22f63406ed166bfee"
49
+ }