biome.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  3. "vcs": {
  4. "enabled": true,
  5. "clientKind": "git",
  6. "useIgnoreFile": true,
  7. "defaultBranch": "master"
  8. },
  9. "organizeImports": {
  10. "enabled": false
  11. },
  12. "linter": {
  13. "enabled": true,
  14. "rules": {
  15. "recommended": false,
  16. "a11y": {
  17. "noBlankTarget": "error"
  18. },
  19. "correctness": {
  20. "noGlobalObjectCalls": "error",
  21. "noUnreachable": "error",
  22. "useHookAtTopLevel": "error",
  23. "useIsNan": "error",
  24. "noUnusedPrivateClassMembers": "error",
  25. "noInvalidUseBeforeDeclaration": "error"
  26. },
  27. "complexity": {
  28. "useFlatMap": "error",
  29. "useOptionalChain": "error",
  30. "noEmptyTypeParameters": "error",
  31. "noUselessLoneBlockStatements": "error",
  32. "noUselessEmptyExport": "error",
  33. "noUselessConstructor": "error",
  34. "noUselessTypeConstraint": "error",
  35. "noExcessiveNestedTestSuites": "error"
  36. },
  37. "nursery": {
  38. "noDuplicateJsonKeys": "error",
  39. "noNodejsModules": "error"
  40. },
  41. "performance": {
  42. "noBarrelFile": "error"
  43. },
  44. "security": {
  45. "noDangerouslySetInnerHtmlWithChildren": "error"
  46. },
  47. "suspicious": {
  48. "noDebugger": "error",
  49. "noDoubleEquals": "error",
  50. "noDuplicateJsxProps": "error",
  51. "noDuplicateObjectKeys": "error",
  52. "noDuplicateParameters": "error",
  53. "noDuplicateCase": "error",
  54. "noFallthroughSwitchClause": "error",
  55. "noRedeclare": "error",
  56. "noSparseArray": "error",
  57. "noUnsafeDeclarationMerging": "error",
  58. "noUnsafeNegation": "error",
  59. "useIsArray": "error",
  60. "noApproximativeNumericConstant": "error",
  61. "noMisrefactoredShorthandAssign": "error",
  62. "useAwait": "error",
  63. "useNamespaceKeyword": "error",
  64. "noSkippedTests": "error",
  65. "noFocusedTests": "error",
  66. "noDuplicateTestHooks": "error"
  67. },
  68. "style": {
  69. "noCommaOperator": "error",
  70. "noShoutyConstants": "error",
  71. "noParameterProperties": "error",
  72. "noVar": "error",
  73. "useConst": "error",
  74. "useShorthandFunctionType": "error",
  75. "useExportType": "error",
  76. "useImportType": "error",
  77. "useNodejsImportProtocol": "error",
  78. "useLiteralEnumMembers": "error",
  79. "useEnumInitializers": "error",
  80. "useAsConstAssertion": "error"
  81. }
  82. }
  83. },
  84. "files": {
  85. "ignoreUnknown": true,
  86. "ignore": [
  87. "**/*/trace.json",
  88. "static/app/data/world.json",
  89. "**/*.sourcemap.js",
  90. "**/*.min.js",
  91. "fixtures",
  92. ".devenv"
  93. ]
  94. },
  95. "formatter": {
  96. "enabled": false,
  97. "formatWithErrors": true,
  98. "indentStyle": "space",
  99. "indentWidth": 2,
  100. "lineEnding": "lf",
  101. "ignore": ["tests/**/*.json"]
  102. },
  103. "javascript": {
  104. "formatter": {
  105. "enabled": false,
  106. "lineWidth": 90,
  107. "quoteStyle": "single",
  108. "jsxQuoteStyle": "double",
  109. "quoteProperties": "asNeeded",
  110. "trailingComma": "es5",
  111. "semicolons": "always",
  112. "arrowParentheses": "asNeeded",
  113. "bracketSpacing": false,
  114. "bracketSameLine": false
  115. }
  116. },
  117. "json": {
  118. "formatter": {
  119. "enabled": true
  120. }
  121. },
  122. "overrides": [
  123. {
  124. "include": ["biome.json", "config/tsconfig.*", "tsconfig.json", ".vscode/*"],
  125. "json": {
  126. "parser": {
  127. "allowComments": true,
  128. "allowTrailingCommas": true
  129. }
  130. }
  131. },
  132. {
  133. "include": [
  134. "api-docs/*.ts",
  135. "build-utils/*.ts",
  136. "config/*.ts",
  137. "scripts",
  138. "tests/js/sentry-test/loadFixtures.ts",
  139. "tests/js/jest-pegjs-transform.js",
  140. "tests/js/setup.ts",
  141. "tests/js/test-balancer/index.js",
  142. "*.config.ts"
  143. ],
  144. "linter": {
  145. "rules": {
  146. "nursery": {
  147. "noNodejsModules": "off"
  148. }
  149. }
  150. }
  151. },
  152. {
  153. "include": ["src/sentry/templates/sentry/error-page-embed.js"],
  154. "linter": {
  155. "rules": {
  156. "style": {
  157. "noVar": "off"
  158. }
  159. }
  160. }
  161. },
  162. {
  163. "include": [
  164. "static/app/utils/replays/types.tsx",
  165. "static/app/utils/queryClient.tsx",
  166. "static/app/views/performance/traceDetails/styles.tsx",
  167. "static/app/icons/index.tsx",
  168. "static/app/components/tabs/index.tsx",
  169. "static/app/components/sparklines/line.tsx",
  170. "static/app/types/index.tsx",
  171. "tests/js/sentry-test/reactTestingLibrary.tsx",
  172. "tests/js/sentry-test/index.tsx"
  173. ],
  174. "linter": {
  175. "rules": {
  176. "performance": {
  177. "noBarrelFile": "off"
  178. }
  179. }
  180. }
  181. }
  182. ]
  183. }