@nivalis/biome-config 2.3.5 → 2.3.7
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/LICENSE +22 -0
- package/README.md +79 -0
- package/biome.json +1 -1
- package/package.json +13 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2025 Nivalis
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @nivalis/biome-config
|
|
2
|
+
|
|
3
|
+
Shared [Biome](https://biomejs.dev/) formatter, linter, and assist configuration used across the Nivalis projects. It encodes the conventions from `AGENTS.md` so every repo can stay in sync with a single dependency.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Enforces consistent formatting rules for TS/JS, CSS, JSON, HTML, Markdown, and frameworks including React/Next.
|
|
8
|
+
- Ships with strict accessibility, correctness, performance, and security lint rules tuned for modern stacks.
|
|
9
|
+
- Provides sensible project-wide ignore patterns for build artifacts, coverage directories, and generated files.
|
|
10
|
+
- Includes overrides for scripts, tests, stories, and declaration files so the right amount of linting is applied per context.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pnpm add -D @nivalis/biome-config
|
|
16
|
+
# or
|
|
17
|
+
npm install -D @nivalis/biome-config
|
|
18
|
+
yarn add -D @nivalis/biome-config
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Create a `biome.json` (or `biome.jsonc`) in your project root and extend this package:
|
|
24
|
+
|
|
25
|
+
```jsonc
|
|
26
|
+
{
|
|
27
|
+
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
|
|
28
|
+
"extends": ["@nivalis/biome-config/biome.json"],
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
From there you can override any section locally, for example to loosen a rule for tests:
|
|
33
|
+
|
|
34
|
+
```jsonc
|
|
35
|
+
{
|
|
36
|
+
"overrides": [
|
|
37
|
+
{
|
|
38
|
+
"includes": ["**/*.test.ts"],
|
|
39
|
+
"linter": {
|
|
40
|
+
"rules": {
|
|
41
|
+
"correctness": { "noUnusedVariables": "off" },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Add a lint script that surfaces violations quickly:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"scripts": {
|
|
54
|
+
"lint": "biome check",
|
|
55
|
+
"lint:fix": "biome check --write"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Running `pnpm lint` fails on style or lint errors, while `pnpm lint:fix` auto-formats in place. The config also enables Biome Assist actions (auto import sorting, key sorting, etc.) inside supported editors.
|
|
61
|
+
|
|
62
|
+
## Repository Scripts
|
|
63
|
+
|
|
64
|
+
- `pnpm lint` – run Biome in check mode.
|
|
65
|
+
- `pnpm lint:fix` – run Biome with `--write` to apply safe fixes.
|
|
66
|
+
- `pnpm prepare` – installs Lefthook so Git hooks can run Biome before you commit.
|
|
67
|
+
|
|
68
|
+
## Publishing
|
|
69
|
+
|
|
70
|
+
This package is published to npm as `@nivalis/biome-config` with public access. To cut a new release:
|
|
71
|
+
|
|
72
|
+
1. Update the version in `package.json` following semver.
|
|
73
|
+
2. Run `pnpm install` and `pnpm lint` to ensure the config is valid.
|
|
74
|
+
3. Commit the changes and tag the release.
|
|
75
|
+
4. `pnpm publish --access public` (the registry is already configured via `publishConfig`).
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
See the repository's license file for details (or add one if missing before publishing).
|
package/biome.json
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nivalis/biome-config",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "Configuration for biome",
|
|
5
5
|
"main": "./biome.json",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/nivalis-studio/biome-config#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "git+https://github.com/nivalis-studio/biome-config.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/nivalis-studio/biome-config/issues"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
6
17
|
"scripts": {
|
|
7
18
|
"prepare": "lefthook install",
|
|
8
19
|
"lint": "biome check",
|
|
@@ -10,11 +21,7 @@
|
|
|
10
21
|
},
|
|
11
22
|
"files": ["biome.json"],
|
|
12
23
|
"keywords": ["biome", "linter", "formatter", "fixer"],
|
|
13
|
-
"packageManager": "pnpm@10.
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"access": "public",
|
|
16
|
-
"registry": "https://registry.npmjs.org/"
|
|
17
|
-
},
|
|
24
|
+
"packageManager": "pnpm@10.23.0",
|
|
18
25
|
"devDependencies": {
|
|
19
26
|
"@biomejs/biome": "catalog:",
|
|
20
27
|
"@commitlint/cli": "catalog:",
|