@yuu1111/biome-config 1.0.4 → 1.1.1
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 +3 -0
- package/base.json +2 -1
- package/package.json +22 -16
- package/plugins/no-reexports.grit +16 -0
package/README.md
CHANGED
|
@@ -12,6 +12,9 @@ bun add -D @yuu1111/biome-config
|
|
|
12
12
|
|
|
13
13
|
### Base
|
|
14
14
|
|
|
15
|
+
Includes a plugin that prohibits re-exports. Export declarations must define their
|
|
16
|
+
value or type directly instead of forwarding another declaration.
|
|
17
|
+
|
|
15
18
|
```json
|
|
16
19
|
{
|
|
17
20
|
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
|
package/base.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.4.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
|
3
3
|
"vcs": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"clientKind": "git",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"plugins": ["./node_modules/@yuu1111/biome-config/plugins/no-reexports.grit"],
|
|
22
23
|
"javascript": {
|
|
23
24
|
"formatter": {
|
|
24
25
|
"quoteStyle": "double"
|
package/package.json
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"name": "@yuu1111/biome-config",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Shared Biome configuration",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/yuu1111/configs.git",
|
|
9
|
+
"directory": "packages/biome-config"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
"./biome": "./base.json",
|
|
13
|
+
"./react": "./react.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"base.json",
|
|
17
|
+
"plugins",
|
|
18
|
+
"react.json"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"biome",
|
|
22
|
+
"config"
|
|
23
|
+
]
|
|
18
24
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
engine biome(1.0)
|
|
2
|
+
language js(typescript)
|
|
3
|
+
|
|
4
|
+
or {
|
|
5
|
+
JsExport(export_clause=JsExportFromClause()) as $match,
|
|
6
|
+
JsExport(export_clause=JsExportNamedFromClause()) as $match,
|
|
7
|
+
JsExport(export_clause=JsExportNamedClause()) as $match,
|
|
8
|
+
JsExport(export_clause=TsTypeAliasDeclaration(ty=$type)) as $match where {
|
|
9
|
+
$type <: r"^[A-Za-z_$][A-Za-z0-9_$]*$",
|
|
10
|
+
not $type <: r"^(?:any|bigint|boolean|never|null|number|object|string|symbol|undefined|unknown|void)$"
|
|
11
|
+
},
|
|
12
|
+
JsExport(export_clause=JsExportDefaultExpressionClause(expression=JsIdentifierExpression())) as $match,
|
|
13
|
+
JsExport(export_clause=JsVariableDeclarationClause(declaration=JsVariableDeclaration(declarators=$declarators))) as $match where {
|
|
14
|
+
$declarators <: some JsVariableDeclarator(initializer=JsInitializerClause(expression=JsIdentifierExpression()))
|
|
15
|
+
}
|
|
16
|
+
} where { register_diagnostic(span=$match, message="Re-export is prohibited") }
|