205 lines
4.8 KiB
JSON
205 lines
4.8 KiB
JSON
{
|
|
"root": true,
|
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"defaultBranch": "main"
|
|
},
|
|
"assist": {
|
|
"enabled": true,
|
|
"actions": {
|
|
"source": {
|
|
"organizeImports": "on",
|
|
"useSortedAttributes": "on"
|
|
}
|
|
}
|
|
},
|
|
"linter": {
|
|
"enabled": true,
|
|
"domains": {
|
|
"react": "recommended"
|
|
},
|
|
// Ideally we would want to turn on all the rules that are currently off,
|
|
// keeping them off currently to make sure only changes on the migrations
|
|
// are included in the initial PR before we apply the format and lint changes.
|
|
// TODO: turn on all rules that are currently off if applicable.
|
|
// TODO: Remove --diagnostic-level=error from CI commands.
|
|
"rules": {
|
|
"recommended": true,
|
|
"correctness": {
|
|
"useExhaustiveDependencies": "info",
|
|
"noUndeclaredVariables": "off",
|
|
"noEmptyPattern": "info",
|
|
"useJsxKeyInIterable": "off",
|
|
"noInnerDeclarations": "off",
|
|
"useHookAtTopLevel": "info",
|
|
"useYield": "info",
|
|
"noConstructorReturn": "off",
|
|
"noInvalidPositionAtImportRule": "off",
|
|
"noSwitchDeclarations": "off",
|
|
"noUnusedImports": "error"
|
|
},
|
|
"a11y": "info",
|
|
"style": {
|
|
"useNodejsImportProtocol": "off",
|
|
"useImportType": "off",
|
|
"useBlockStatements": "off",
|
|
"useNamingConvention": "off",
|
|
"useThrowOnlyError": "info",
|
|
"useConsistentArrayType": "off",
|
|
"noParameterAssign": "off",
|
|
"useAsConstAssertion": "off",
|
|
"useDefaultParameterLast": "off",
|
|
"noNonNullAssertion": "info",
|
|
"useEnumInitializers": "off",
|
|
"useSelfClosingElements": "info",
|
|
"useSingleVarDeclarator": "off",
|
|
"useNumberNamespace": "off",
|
|
"noInferrableTypes": "off",
|
|
"useTemplate": "info",
|
|
"noUselessElse": "info"
|
|
},
|
|
"suspicious": {
|
|
"noDoubleEquals": "warn",
|
|
"noImplicitAnyLet": "info",
|
|
"noThenProperty": "off",
|
|
"noAsyncPromiseExecutor": "info",
|
|
"noImportAssign": "off",
|
|
"noExplicitAny": "info",
|
|
"noControlCharactersInRegex": "warn",
|
|
"noShadowRestrictedNames": "off",
|
|
"noArrayIndexKey": "info",
|
|
"noAssignInExpressions": "info",
|
|
"useIterableCallbackReturn": "info"
|
|
},
|
|
"complexity": {
|
|
"noUselessConstructor": "info",
|
|
"useOptionalChain": "info",
|
|
"noBannedTypes": "warn",
|
|
"useLiteralKeys": "info",
|
|
"noUselessCatch": "info",
|
|
"noUselessSwitchCase": "info",
|
|
"noStaticOnlyClass": "info"
|
|
},
|
|
"security": {
|
|
"noDangerouslySetInnerHtml": "info"
|
|
}
|
|
}
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"indentStyle": "tab",
|
|
"indentWidth": 4,
|
|
"lineWidth": 130,
|
|
"lineEnding": "lf",
|
|
"formatWithErrors": true
|
|
},
|
|
"css": {
|
|
"parser": {
|
|
"tailwindDirectives": true
|
|
}
|
|
},
|
|
"javascript": {
|
|
"formatter": {
|
|
"semicolons": "asNeeded",
|
|
"arrowParentheses": "always",
|
|
"bracketSameLine": true,
|
|
"bracketSpacing": true,
|
|
"jsxQuoteStyle": "double",
|
|
"quoteProperties": "asNeeded",
|
|
"trailingCommas": "all"
|
|
}
|
|
},
|
|
"json": {
|
|
"formatter": {
|
|
"trailingCommas": "none",
|
|
"expand": "always"
|
|
}
|
|
},
|
|
"files": {
|
|
"ignoreUnknown": true,
|
|
"includes": [
|
|
"**",
|
|
// explicitly force files to be ignored by the scanner with !!
|
|
"!!**/dist",
|
|
"!!**/dist-*",
|
|
"!!**/out",
|
|
"!!**/evals",
|
|
"!!**/playwright",
|
|
"!!**/.vscode-test",
|
|
"!!**/test-results",
|
|
"!!**/coverage",
|
|
"!!**/node_modules",
|
|
"!!**/webview-ui/build",
|
|
"!!**/generated",
|
|
"!!**/proto",
|
|
"!!**/tests/specs",
|
|
"!!assets/icons/*.svg"
|
|
]
|
|
},
|
|
"plugins": [
|
|
"src/dev/grit/process-env.grit"
|
|
],
|
|
"overrides": [
|
|
{
|
|
"includes": [
|
|
"**",
|
|
"!!**/dist",
|
|
"!!**/hosts/vscode/**",
|
|
"!!**/test/**",
|
|
"!!**/*.test.ts",
|
|
"!!src/dev/**",
|
|
"!!src/extension.ts",
|
|
"!!src/integrations/git/commit-message-generator.ts",
|
|
"!!src/integrations/terminal/**",
|
|
"!!src/core/controller/ui/openWalkthrough.ts"
|
|
],
|
|
"plugins": [
|
|
"src/dev/grit/vscode-api.grit"
|
|
]
|
|
},
|
|
{
|
|
// Do not use console logging directly, use the Logger service instead.
|
|
"plugins": [
|
|
"src/dev/grit/console-log.grit"
|
|
],
|
|
"includes": [
|
|
"**",
|
|
"!!**/esbuild.*",
|
|
"!!**/*.mts",
|
|
"!!**/webview-ui/**",
|
|
"!!**/evals/**",
|
|
"!!**/standalone/**",
|
|
"!!**/cli/**",
|
|
"!!**/e2e/**",
|
|
"!!**/test/**",
|
|
"!!**/__tests__/**",
|
|
"!!**/*.test.ts",
|
|
"!!**/*.stories.ts",
|
|
"!!src/dev/**",
|
|
"!!**/*.mjs",
|
|
"!!**/*.js",
|
|
"!!**/scripts/**",
|
|
"!!**/*.tsx",
|
|
"!!**/testing-platform/**"
|
|
]
|
|
},
|
|
{
|
|
"includes": [
|
|
"**",
|
|
"!!src/core/storage/state-migrations.ts",
|
|
"!!src/core/storage/FileContextTracker.ts",
|
|
"!!src/core/context/context-tracking/FileContextTracker.ts",
|
|
"!!src/common.ts",
|
|
"!!src/services/logging/distinctId.ts",
|
|
"!!src/core/storage/utils/state-helpers.ts",
|
|
"!!src/extension.ts"
|
|
],
|
|
"plugins": [
|
|
"src/dev/grit/use-cache-service.grit"
|
|
]
|
|
}
|
|
]
|
|
}
|