@vitus-labs/tools-lint 1.9.1-alpha.7 → 1.9.1-alpha.8
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/README.md +47 -0
- package/biome.shared.json +2 -2
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @vitus-labs/tools-lint
|
|
2
|
+
|
|
3
|
+
Shared [Biome](https://biomejs.dev) configuration for formatting and linting.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add -d @vitus-labs/tools-lint
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Create a `biome.json` in your project root:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"$schema": "https://biomejs.dev/schemas/2.3.14/schema.json",
|
|
18
|
+
"extends": ["@vitus-labs/tools-lint/biome"]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What's included
|
|
23
|
+
|
|
24
|
+
### Formatting
|
|
25
|
+
|
|
26
|
+
- 2 spaces, single quotes, no semicolons
|
|
27
|
+
- Trailing commas, LF line endings
|
|
28
|
+
- JSX uses double quotes
|
|
29
|
+
- Line width: 80
|
|
30
|
+
|
|
31
|
+
### Linting
|
|
32
|
+
|
|
33
|
+
Biome recommended rules plus:
|
|
34
|
+
|
|
35
|
+
- `noUnusedVariables` / `noUnusedImports` — error
|
|
36
|
+
- `useHookAtTopLevel` — error
|
|
37
|
+
- `noExplicitAny` — off
|
|
38
|
+
- `noConsole` — warn
|
|
39
|
+
- `noShadow` — warn
|
|
40
|
+
|
|
41
|
+
### Global variables
|
|
42
|
+
|
|
43
|
+
Pre-declared so the linter doesn't flag them: `__BROWSER__`, `__NATIVE__`, `__NODE__`, `__WEB__`, `__CLIENT__`, `__VERSION__`, `__VITUS_LABS_STORIES__`.
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
package/biome.shared.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
|
|
3
3
|
"formatter": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"indentStyle": "space",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"noEmptyBlockStatements": "warn"
|
|
77
77
|
},
|
|
78
78
|
"security": {
|
|
79
|
-
"noDangerouslySetInnerHtml": "
|
|
79
|
+
"noDangerouslySetInnerHtml": "error"
|
|
80
80
|
},
|
|
81
81
|
"performance": {
|
|
82
82
|
"noAccumulatingSpread": "off"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/tools-lint",
|
|
3
|
-
"version": "1.9.1-alpha.
|
|
3
|
+
"version": "1.9.1-alpha.8+3cc7faf",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@biomejs/biome": "^2.4.
|
|
28
|
+
"@biomejs/biome": "^2.4.6"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "3cc7faf4e7f28293742345a66d0ba371c1e1606b"
|
|
31
31
|
}
|