@luxonis/linting 0.0.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 +19 -0
- package/biome.json +157 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @luxonis/linting
|
|
2
|
+
|
|
3
|
+
Shared Luxonis linting configuration package.
|
|
4
|
+
|
|
5
|
+
## Biome
|
|
6
|
+
|
|
7
|
+
Install both the shared config and Biome in the consuming project:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save-dev @biomejs/biome @luxonis/linting
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use the packaged Biome config from your project config file:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"extends": ["@luxonis/linting/biome.json"]
|
|
18
|
+
}
|
|
19
|
+
```
|
package/biome.json
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"clientKind": "git",
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"ignoreUnknown": false,
|
|
10
|
+
"includes": [
|
|
11
|
+
"**/libraries/depthai-pipelines-lib/src/**",
|
|
12
|
+
"**/libraries/depthai-pipelines-lib/panda.config.ts",
|
|
13
|
+
"**/libraries/depthai-visualizer-lib/src/**",
|
|
14
|
+
"**/libraries/depthai-visualizer-lib/scripts/**",
|
|
15
|
+
"**/packages/common/src/**",
|
|
16
|
+
"**/packages/visualizer/src/**",
|
|
17
|
+
"**/packages/depthai-viewer/frontend/src/**",
|
|
18
|
+
"**/packages/depthai-viewer/native/src/**",
|
|
19
|
+
"**/packages/depthai-viewer/viewer-analytics-proxy/src/**",
|
|
20
|
+
"**/packages/depthai-viewer/viewer-error-reporting-proxy/src/**",
|
|
21
|
+
"!**/packages/depthai-viewer/frontend/public/styled-system",
|
|
22
|
+
"!**/packages/visualizer/public/styled-system"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"formatter": {
|
|
26
|
+
"enabled": true,
|
|
27
|
+
"indentStyle": "tab",
|
|
28
|
+
"lineEnding": "lf",
|
|
29
|
+
"lineWidth": 100
|
|
30
|
+
},
|
|
31
|
+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
|
|
32
|
+
"linter": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"rules": {
|
|
35
|
+
"recommended": true,
|
|
36
|
+
"complexity": {
|
|
37
|
+
"noBannedTypes": "error",
|
|
38
|
+
"noExtraBooleanCast": "error",
|
|
39
|
+
"noUselessCatch": "error",
|
|
40
|
+
"noUselessThisAlias": "error",
|
|
41
|
+
"noUselessTypeConstraint": "error",
|
|
42
|
+
"noAdjacentSpacesInRegex": "error"
|
|
43
|
+
},
|
|
44
|
+
"correctness": {
|
|
45
|
+
"noConstAssign": "error",
|
|
46
|
+
"noConstantCondition": "error",
|
|
47
|
+
"noEmptyCharacterClassInRegex": "error",
|
|
48
|
+
"noEmptyPattern": "error",
|
|
49
|
+
"noGlobalObjectCalls": "error",
|
|
50
|
+
"noInnerDeclarations": "error",
|
|
51
|
+
"noInvalidConstructorSuper": "error",
|
|
52
|
+
"noNonoctalDecimalEscape": "error",
|
|
53
|
+
"noPrecisionLoss": "error",
|
|
54
|
+
"noSelfAssign": "error",
|
|
55
|
+
"noSetterReturn": "error",
|
|
56
|
+
"noSwitchDeclarations": "error",
|
|
57
|
+
"noUndeclaredVariables": "error",
|
|
58
|
+
"noUnreachable": "error",
|
|
59
|
+
"noUnreachableSuper": "error",
|
|
60
|
+
"noUnsafeFinally": "error",
|
|
61
|
+
"noUnsafeOptionalChaining": "error",
|
|
62
|
+
"noUnusedLabels": "error",
|
|
63
|
+
"noUnusedVariables": "error",
|
|
64
|
+
"useExhaustiveDependencies": "warn",
|
|
65
|
+
"useHookAtTopLevel": "error",
|
|
66
|
+
"useIsNan": "error",
|
|
67
|
+
"useValidForDirection": "error",
|
|
68
|
+
"useYield": "error",
|
|
69
|
+
"noInvalidBuiltinInstantiation": "error",
|
|
70
|
+
"useValidTypeof": "error"
|
|
71
|
+
},
|
|
72
|
+
"style": {
|
|
73
|
+
"noNamespace": "error",
|
|
74
|
+
"useAsConstAssertion": "error",
|
|
75
|
+
"useTemplate": "error",
|
|
76
|
+
"noNonNullAssertion": "off",
|
|
77
|
+
"useArrayLiterals": "off"
|
|
78
|
+
},
|
|
79
|
+
"suspicious": {
|
|
80
|
+
"noAssignInExpressions": "error",
|
|
81
|
+
"noAsyncPromiseExecutor": "error",
|
|
82
|
+
"noCatchAssign": "error",
|
|
83
|
+
"noClassAssign": "error",
|
|
84
|
+
"noCompareNegZero": "error",
|
|
85
|
+
"noControlCharactersInRegex": "error",
|
|
86
|
+
"noDebugger": "error",
|
|
87
|
+
"noDuplicateCase": "error",
|
|
88
|
+
"noDuplicateClassMembers": "error",
|
|
89
|
+
"noDuplicateObjectKeys": "error",
|
|
90
|
+
"noDuplicateParameters": "error",
|
|
91
|
+
"noEmptyBlockStatements": "error",
|
|
92
|
+
"noExplicitAny": "error",
|
|
93
|
+
"noExtraNonNullAssertion": "error",
|
|
94
|
+
"noFallthroughSwitchClause": "error",
|
|
95
|
+
"noFunctionAssign": "error",
|
|
96
|
+
"noGlobalAssign": "error",
|
|
97
|
+
"noImportAssign": "error",
|
|
98
|
+
"noMisleadingCharacterClass": "error",
|
|
99
|
+
"noMisleadingInstantiator": "error",
|
|
100
|
+
"noPrototypeBuiltins": "error",
|
|
101
|
+
"noRedeclare": "error",
|
|
102
|
+
"noShadowRestrictedNames": "error",
|
|
103
|
+
"noSparseArray": "error",
|
|
104
|
+
"noUnsafeDeclarationMerging": "error",
|
|
105
|
+
"noUnsafeNegation": "error",
|
|
106
|
+
"useGetterReturn": "error",
|
|
107
|
+
"noArrayIndexKey": "off",
|
|
108
|
+
"noWith": "error"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"javascript": {
|
|
113
|
+
"formatter": {
|
|
114
|
+
"indentStyle": "tab",
|
|
115
|
+
"indentWidth": 2,
|
|
116
|
+
"lineEnding": "lf",
|
|
117
|
+
"lineWidth": 100,
|
|
118
|
+
"quoteStyle": "single"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"overrides": [
|
|
122
|
+
{
|
|
123
|
+
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
|
|
124
|
+
"linter": {
|
|
125
|
+
"rules": {
|
|
126
|
+
"correctness": {
|
|
127
|
+
"noConstAssign": "off",
|
|
128
|
+
"noGlobalObjectCalls": "off",
|
|
129
|
+
"noInvalidConstructorSuper": "off",
|
|
130
|
+
"noSetterReturn": "off",
|
|
131
|
+
"noUndeclaredVariables": "off",
|
|
132
|
+
"noUnreachable": "off",
|
|
133
|
+
"noUnreachableSuper": "off",
|
|
134
|
+
"noInvalidBuiltinInstantiation": "off"
|
|
135
|
+
},
|
|
136
|
+
"style": {
|
|
137
|
+
"useConst": "error"
|
|
138
|
+
},
|
|
139
|
+
"suspicious": {
|
|
140
|
+
"noDuplicateClassMembers": "off",
|
|
141
|
+
"noDuplicateObjectKeys": "off",
|
|
142
|
+
"noDuplicateParameters": "off",
|
|
143
|
+
"noFunctionAssign": "off",
|
|
144
|
+
"noImportAssign": "off",
|
|
145
|
+
"noRedeclare": "off",
|
|
146
|
+
"noUnsafeNegation": "off",
|
|
147
|
+
"useGetterReturn": "off",
|
|
148
|
+
"noVar": "error"
|
|
149
|
+
},
|
|
150
|
+
"complexity": {
|
|
151
|
+
"noArguments": "error"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxonis/linting",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Luxonis shared Biome configuration",
|
|
5
|
+
"author": "Luxonis Corp",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"files": [
|
|
8
|
+
"biome.json",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
"./biome": "./biome.json",
|
|
13
|
+
"./biome.json": "./biome.json"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"registry": "https://registry.npmjs.org",
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"@biomejs/biome": "^2.0.0"
|
|
21
|
+
},
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"scripts": {
|
|
24
|
+
"publish": "npm publish",
|
|
25
|
+
"build": "node --eval \"JSON.parse(require('node:fs').readFileSync('biome.json', 'utf8'))\"",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
}
|
|
28
|
+
}
|