chore: add coding conventions from nerve
- CLAUDE.md: functional-first, type over interface, no optional props, Result type - biome.json: lint + format config (Biome 1.9) - tsconfig.json: strict mode, composite project references - .cursor/rules: global conventions + no-dynamic-import Adapted from uncaged/nerve for bun workspace. 小橘 <xiaoju@shazhou.work>
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
|
||||
"files": {
|
||||
"ignore": ["**/dist/**", "**/node_modules/**"]
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"formatter": {
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineWidth": 100
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"semicolons": "always"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"include": ["**/__tests__/**"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"suspicious": {
|
||||
"noExplicitAny": "off"
|
||||
},
|
||||
"style": {
|
||||
"noNonNullAssertion": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"style": {
|
||||
"noDefaultExport": "error",
|
||||
"useNodejsImportProtocol": "error",
|
||||
"noNamespace": "error",
|
||||
"noParameterProperties": "error",
|
||||
"useImportType": "error",
|
||||
"useShorthandFunctionType": "error",
|
||||
"noVar": "error",
|
||||
"useConst": "error",
|
||||
"useEnumInitializers": "error"
|
||||
},
|
||||
"complexity": {
|
||||
"noThisInStatic": "error",
|
||||
"noStaticOnlyClass": "error",
|
||||
"noForEach": "error",
|
||||
"useArrowFunction": "error",
|
||||
"noExcessiveCognitiveComplexity": {
|
||||
"level": "warn",
|
||||
"options": {
|
||||
"maxAllowedComplexity": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"suspicious": {
|
||||
"noExplicitAny": "error"
|
||||
},
|
||||
"correctness": {
|
||||
"noUnusedVariables": "error",
|
||||
"noUnusedImports": "error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user