@node-cli/biome-config 0.0.0 → 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 +32 -1
  3. package/biome.json +152 -0
  4. package/package.json +25 -14
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Arno Versini
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,34 @@
1
1
  # @node-cli/biome-config
2
2
 
3
- Placeholder. The real package is published from https://github.com/versini-org/node-cli.
3
+ The biome config shared across the `@versini` and `@node-cli` repos. It ships
4
+ `biome.json` and nothing else.
5
+
6
+ ```json
7
+ {
8
+ "extends": ["@node-cli/biome-config/biome"]
9
+ }
10
+ ```
11
+
12
+ `@biomejs/biome` is a peer dependency. Each repo declares the biome version it
13
+ runs, along with every other tool it uses, directly in its own `package.json`.
14
+ With `autoInstallPeers: false`, which every consumer sets, nothing installs
15
+ biome for you.
16
+
17
+ ## Why it holds no dependencies
18
+
19
+ This config used to live in `@versini/dev-dependencies-common`, which also
20
+ bundled the tooling, so a repo got biome, typescript, vitest and the rest from
21
+ one pin. That coupled every repo to the bundle's release: a new major of any
22
+ tool reached the whole fleet the moment the bundle published, and a package one
23
+ repo needed was installed by all of them. Each repo now owns its tooling and
24
+ moves on its own schedule, and deps-train keeps the non-major versions aligned
25
+ across them.
26
+
27
+ Do not add dependencies here. A tool the repos share goes in each repo's
28
+ `package.json`.
29
+
30
+ ## Changing the config
31
+
32
+ A rule that needs a newer biome raises the floor of the peer range in the same
33
+ change, so a repo on an older biome gets a peer warning instead of a config
34
+ error it cannot explain.
package/biome.json ADDED
@@ -0,0 +1,152 @@
1
+ {
2
+ "root": false,
3
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
4
+ "assist": { "actions": { "source": { "organizeImports": "on" } } },
5
+ "vcs": {
6
+ "enabled": true,
7
+ "clientKind": "git",
8
+ "useIgnoreFile": true
9
+ },
10
+ "formatter": {
11
+ "attributePosition": "auto",
12
+ "enabled": true,
13
+ "formatWithErrors": true,
14
+ "indentStyle": "tab",
15
+ "indentWidth": 2,
16
+ "lineEnding": "lf",
17
+ "lineWidth": 80
18
+ },
19
+ "linter": {
20
+ "enabled": true,
21
+ "rules": {
22
+ "preset": "none",
23
+ "a11y": {},
24
+ "complexity": {
25
+ "noBannedTypes": "error",
26
+ "noExtraBooleanCast": "error",
27
+ "noUselessCatch": "error",
28
+ "noUselessFragments": "error",
29
+ "noUselessThisAlias": "error",
30
+ "noUselessTypeConstraint": "error",
31
+ "noAdjacentSpacesInRegex": "error",
32
+ "noArguments": "error"
33
+ },
34
+ "correctness": {
35
+ "noChildrenProp": "error",
36
+ "noConstAssign": "error",
37
+ "noConstantCondition": "error",
38
+ "noEmptyCharacterClassInRegex": "error",
39
+ "noEmptyPattern": "error",
40
+ "noGlobalObjectCalls": "error",
41
+ "noInnerDeclarations": "error",
42
+ "noInvalidConstructorSuper": "error",
43
+ "noInvalidUseBeforeDeclaration": "error",
44
+ "noNonoctalDecimalEscape": "error",
45
+ "noPrecisionLoss": "error",
46
+ "noSelfAssign": "error",
47
+ "noSetterReturn": "error",
48
+ "noSwitchDeclarations": "error",
49
+ "noUndeclaredVariables": "error",
50
+ "noUnreachable": "error",
51
+ "noUnreachableSuper": "error",
52
+ "noUnsafeFinally": "error",
53
+ "noUnsafeOptionalChaining": "error",
54
+ "noUnusedImports": {
55
+ "options": {},
56
+ "level": "warn",
57
+ "fix": "safe"
58
+ },
59
+ "noUnusedLabels": "error",
60
+ "noUnusedVariables": "error",
61
+ "useExhaustiveDependencies": "warn",
62
+ "useHookAtTopLevel": "error",
63
+ "useIsNan": "error",
64
+ "useJsxKeyInIterable": "error",
65
+ "useValidForDirection": "error",
66
+ "useYield": "error",
67
+ "noInvalidBuiltinInstantiation": "error",
68
+ "useValidTypeof": "error"
69
+ },
70
+ "security": {
71
+ "noDangerouslySetInnerHtml": "error",
72
+ "noGlobalEval": "error",
73
+ "noBlankTarget": "error"
74
+ },
75
+ "style": {
76
+ "useAsConstAssertion": "error",
77
+ "useBlockStatements": "error",
78
+ "useConst": "error"
79
+ },
80
+ "suspicious": {
81
+ "noAssignInExpressions": "error",
82
+ "noAsyncPromiseExecutor": "error",
83
+ "noCatchAssign": "error",
84
+ "noClassAssign": "error",
85
+ "noCommentText": "error",
86
+ "noCompareNegZero": "error",
87
+ "noControlCharactersInRegex": "error",
88
+ "noDebugger": "error",
89
+ "noDoubleEquals": "error",
90
+ "noDuplicateCase": "error",
91
+ "noDuplicateClassMembers": "error",
92
+ "noDuplicateJsxProps": "error",
93
+ "noDuplicateObjectKeys": "error",
94
+ "noDuplicateParameters": "error",
95
+ "noEmptyBlockStatements": "off",
96
+ "noExplicitAny": "off",
97
+ "noExtraNonNullAssertion": "error",
98
+ "noFallthroughSwitchClause": "error",
99
+ "noFunctionAssign": "error",
100
+ "noGlobalAssign": "error",
101
+ "noImportAssign": "error",
102
+ "noLabelVar": "error",
103
+ "noMisleadingCharacterClass": "error",
104
+ "noMisleadingInstantiator": "error",
105
+ "noPrototypeBuiltins": "error",
106
+ "noRedeclare": "error",
107
+ "noShadowRestrictedNames": "error",
108
+ "noUnsafeDeclarationMerging": "error",
109
+ "noUnsafeNegation": "error",
110
+ "useGetterReturn": "error",
111
+ "noWith": "error",
112
+ "noVar": "error",
113
+ "noConsole": {
114
+ "level": "warn",
115
+ "options": { "allow": ["info", "error", "warn"] }
116
+ }
117
+ }
118
+ },
119
+ "includes": ["**", "!**/dist", "!**/.eslintrc.cjs"]
120
+ },
121
+ "javascript": {
122
+ "globals": ["React"],
123
+ "formatter": {
124
+ "arrowParentheses": "always",
125
+ "attributePosition": "auto",
126
+ "bracketSameLine": false,
127
+ "bracketSpacing": true,
128
+ "jsxQuoteStyle": "double",
129
+ "quoteProperties": "asNeeded",
130
+ "quoteStyle": "double",
131
+ "semicolons": "always",
132
+ "trailingCommas": "all"
133
+ }
134
+ },
135
+ "css": {
136
+ "parser": {
137
+ "tailwindDirectives": true
138
+ }
139
+ },
140
+ "overrides": [
141
+ {
142
+ "includes": ["**/*.test.ts", "**/*.test.tsx"],
143
+ "linter": {
144
+ "rules": {
145
+ "correctness": {
146
+ "noUndeclaredVariables": "off"
147
+ }
148
+ }
149
+ }
150
+ }
151
+ ]
152
+ }
package/package.json CHANGED
@@ -1,15 +1,26 @@
1
1
  {
2
- "name": "@node-cli/biome-config",
3
- "version": "0.0.0",
4
- "license": "MIT",
5
- "author": "Arno Versini",
6
- "description": "Placeholder to register the trusted publisher; the real package publishes from CI.",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/versini-org/node-cli.git",
10
- "directory": "packages/biome-config"
11
- },
12
- "publishConfig": {
13
- "access": "public"
14
- }
15
- }
2
+ "name": "@node-cli/biome-config",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "author": "Arno Versini",
6
+ "description": "The biome config shared across the @versini and @node-cli repos",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/versini-org/node-cli.git",
10
+ "directory": "packages/biome-config"
11
+ },
12
+ "type": "module",
13
+ "files": [
14
+ "biome.json",
15
+ "README.md"
16
+ ],
17
+ "exports": {
18
+ "./biome": "./biome.json"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "peerDependencies": {
24
+ "@biomejs/biome": "^2.5.15"
25
+ }
26
+ }