@raystack/tools-config 0.55.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 ADDED
@@ -0,0 +1,42 @@
1
+ # @raystack/tools-config
2
+
3
+ Shared dev tool configurations for Raystack frontend projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add -D @raystack/tools-config
9
+ ```
10
+
11
+ ## Configs
12
+
13
+ ### Biome
14
+
15
+ ```json
16
+ // biome.json
17
+ {
18
+ "extends": ["@raystack/tools-config/biome"]
19
+ }
20
+ ```
21
+
22
+ ### TSConfig
23
+
24
+ Base config:
25
+ ```json
26
+ // tsconfig.json
27
+ {
28
+ "extends": "@raystack/tools-config/tsconfig/base"
29
+ }
30
+ ```
31
+
32
+ React config (extends base):
33
+ ```json
34
+ // tsconfig.json
35
+ {
36
+ "extends": "@raystack/tools-config/tsconfig/react"
37
+ }
38
+ ```
39
+
40
+ ## License
41
+
42
+ Apsara is [Apache 2.0](LICENSE) licensed.
package/biome.json ADDED
@@ -0,0 +1,167 @@
1
+ {
2
+ "root": false,
3
+ "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
4
+ "vcs": {
5
+ "enabled": true,
6
+ "clientKind": "git",
7
+ "useIgnoreFile": true,
8
+ "defaultBranch": "main"
9
+ },
10
+ "files": { "ignoreUnknown": false, "includes": ["**"] },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "useEditorconfig": true,
14
+ "formatWithErrors": false,
15
+ "indentStyle": "space",
16
+ "indentWidth": 2,
17
+ "lineEnding": "lf",
18
+ "lineWidth": 80,
19
+ "attributePosition": "auto",
20
+ "bracketSpacing": true
21
+ },
22
+ "assist": { "actions": { "source": { "organizeImports": "on" } } },
23
+ "linter": {
24
+ "enabled": true,
25
+ "rules": {
26
+ "recommended": false,
27
+ "a11y": {},
28
+ "complexity": {
29
+ "noExtraBooleanCast": "error",
30
+ "noUselessCatch": "error",
31
+ "noUselessTypeConstraint": "error",
32
+ "noAdjacentSpacesInRegex": "error"
33
+ },
34
+ "correctness": {
35
+ "noChildrenProp": "error",
36
+ "noConstAssign": "error",
37
+ "noConstantCondition": "error",
38
+ "noEmptyCharacterClassInRegex": "error",
39
+ "noEmptyPattern": "warn",
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
+ "noUnusedLabels": "error",
55
+ "noUnusedVariables": "warn",
56
+ "useExhaustiveDependencies": "warn",
57
+ "useHookAtTopLevel": "error",
58
+ "useIsNan": "error",
59
+ "useJsxKeyInIterable": "error",
60
+ "useValidForDirection": "error",
61
+ "useYield": "error",
62
+ "noUnusedImports": "warn",
63
+ "noInvalidBuiltinInstantiation": "error",
64
+ "useValidTypeof": "error"
65
+ },
66
+ "security": {
67
+ "noDangerouslySetInnerHtmlWithChildren": "error",
68
+ "noBlankTarget": "error"
69
+ },
70
+ "style": {
71
+ "noNamespace": "error",
72
+ "useAsConstAssertion": "warn",
73
+ "useArrayLiterals": "off",
74
+ "useConsistentCurlyBraces": "error"
75
+ },
76
+ "suspicious": {
77
+ "noAsyncPromiseExecutor": "error",
78
+ "noCatchAssign": "error",
79
+ "noClassAssign": "error",
80
+ "noCommentText": "warn",
81
+ "noCompareNegZero": "error",
82
+ "noControlCharactersInRegex": "error",
83
+ "noDebugger": "error",
84
+ "noDuplicateCase": "error",
85
+ "noDuplicateClassMembers": "error",
86
+ "noDuplicateJsxProps": "error",
87
+ "noDuplicateObjectKeys": "error",
88
+ "noDuplicateParameters": "error",
89
+ "noEmptyBlockStatements": "warn",
90
+ "noExplicitAny": "warn",
91
+ "noExtraNonNullAssertion": "warn",
92
+ "noFallthroughSwitchClause": "error",
93
+ "noFunctionAssign": "error",
94
+ "noGlobalAssign": "error",
95
+ "noImportAssign": "error",
96
+ "noMisleadingCharacterClass": "error",
97
+ "noMisleadingInstantiator": "error",
98
+ "noPrototypeBuiltins": "error",
99
+ "noRedeclare": "error",
100
+ "noShadowRestrictedNames": "error",
101
+ "noSparseArray": "error",
102
+ "noUnsafeDeclarationMerging": "error",
103
+ "noUnsafeNegation": "error",
104
+ "useGetterReturn": "error",
105
+ "useNamespaceKeyword": "error",
106
+ "noWith": "error"
107
+ },
108
+ "nursery": {}
109
+ }
110
+ },
111
+ "javascript": {
112
+ "formatter": {
113
+ "jsxQuoteStyle": "single",
114
+ "quoteProperties": "asNeeded",
115
+ "trailingCommas": "none",
116
+ "semicolons": "always",
117
+ "arrowParentheses": "asNeeded",
118
+ "bracketSameLine": false,
119
+ "quoteStyle": "single",
120
+ "attributePosition": "auto",
121
+ "bracketSpacing": true
122
+ }
123
+ },
124
+ "css": {
125
+ "parser": {
126
+ "cssModules": true
127
+ }
128
+ },
129
+ "overrides": [
130
+ { "includes": ["**/.eslintrc.{js,cjs}"] },
131
+ {
132
+ "includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
133
+ "linter": {
134
+ "rules": {
135
+ "correctness": {
136
+ "noConstAssign": "off",
137
+ "noGlobalObjectCalls": "off",
138
+ "noInvalidBuiltinInstantiation": "off",
139
+ "noInvalidConstructorSuper": "off",
140
+ "noSetterReturn": "off",
141
+ "noUndeclaredVariables": "off",
142
+ "noUnreachable": "off",
143
+ "noUnreachableSuper": "off"
144
+ },
145
+ "style": {
146
+ "useConst": "error"
147
+ },
148
+ "suspicious": {
149
+ "noClassAssign": "off",
150
+ "noDuplicateClassMembers": "off",
151
+ "noDuplicateObjectKeys": "off",
152
+ "noDuplicateParameters": "off",
153
+ "noFunctionAssign": "off",
154
+ "noImportAssign": "off",
155
+ "noRedeclare": "off",
156
+ "noUnsafeNegation": "off",
157
+ "useGetterReturn": "off",
158
+ "noVar": "error"
159
+ },
160
+ "complexity": {
161
+ "noArguments": "error"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ ]
167
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@raystack/tools-config",
3
+ "version": "0.55.1",
4
+ "description": "Shared dev tool configurations (biome, tsconfig)",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/raystack/apsara.git",
10
+ "directory": "packages/tools-config"
11
+ },
12
+ "homepage": "https://github.com/raystack/apsara/tree/main/packages/tools-config",
13
+ "bugs": {
14
+ "url": "https://github.com/raystack/apsara/issues"
15
+ },
16
+ "keywords": [
17
+ "biome",
18
+ "tsconfig",
19
+ "config",
20
+ "raystack"
21
+ ],
22
+ "author": "Raystack",
23
+ "exports": {
24
+ "./biome": "./biome.json",
25
+ "./tsconfig/base": "./tsconfig/base.json",
26
+ "./tsconfig/react": "./tsconfig/react.json"
27
+ },
28
+ "files": [
29
+ "biome.json",
30
+ "tsconfig"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "engines": {
36
+ "node": ">=22"
37
+ },
38
+ "peerDependencies": {
39
+ "@biomejs/biome": ">=2.0.0"
40
+ },
41
+ "peerDependenciesMeta": {
42
+ "@biomejs/biome": {
43
+ "optional": true
44
+ }
45
+ },
46
+ "scripts": {
47
+ "release": "pnpm publish --access public --no-git-checks"
48
+ }
49
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Default",
4
+ "compilerOptions": {
5
+ "composite": false,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "inlineSources": false,
11
+ "isolatedModules": true,
12
+ "moduleResolution": "node",
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "preserveWatchOutput": true,
16
+ "skipLibCheck": true,
17
+ "strict": true
18
+ },
19
+ "exclude": ["node_modules"]
20
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "React Library",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "jsx": "react-jsx",
7
+ "lib": ["ES2015", "DOM", "ES2017"],
8
+ "module": "ESNext",
9
+ "target": "es6"
10
+ }
11
+ }