biome.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. },
  36. "nursery": {
  37. "noDuplicateJsonKeys": "error",
  38. "noNodejsModules": "error"
  39. },
  40. "performance": {
  41. "noBarrelFile": "error"
  42. },
  43. "security": {
  44. "noDangerouslySetInnerHtmlWithChildren": "error"
  45. },
  46. "suspicious": {
  47. "noDebugger": "error",
  48. "noDoubleEquals": "error",
  49. "noDuplicateJsxProps": "error",
  50. "noDuplicateObjectKeys": "error",
  51. "noDuplicateParameters": "error",
  52. "noDuplicateCase": "error",
  53. "noFallthroughSwitchClause": "error",
  54. "noRedeclare": "error",
  55. "noSparseArray": "error",
  56. "noUnsafeDeclarationMerging": "error",
  57. "noUnsafeNegation": "error",
  58. "useIsArray": "error",
  59. "noApproximativeNumericConstant": "error",
  60. "noMisrefactoredShorthandAssign": "error",
  61. "useAwait": "error",
  62. "useNamespaceKeyword": "error"
  63. },
  64. "style": {
  65. "noCommaOperator": "error",
  66. "noShoutyConstants": "error",
  67. "noParameterProperties": "error",
  68. "noVar": "error",
  69. "useConst": "error",
  70. "useShorthandFunctionType": "error",
  71. "useExportType": "error",
  72. "useImportType": "error",
  73. "useNodejsImportProtocol": "error",
  74. "useLiteralEnumMembers": "error",
  75. "useEnumInitializers": "error",
  76. "useAsConstAssertion": "error"
  77. }
  78. }
  79. },
  80. "files": {
  81. "ignoreUnknown": true,
  82. "ignore": [
  83. "**/*/trace.json",
  84. "static/app/data/world.json",
  85. "**/*.sourcemap.js",
  86. "**/*.min.js",
  87. "fixtures",
  88. ".devenv"
  89. ]
  90. },
  91. "formatter": {
  92. "enabled": false,
  93. "formatWithErrors": true,
  94. "indentStyle": "space",
  95. "indentWidth": 2,
  96. "lineEnding": "lf",
  97. "ignore": ["tests/**/*.json"]
  98. },
  99. "javascript": {
  100. "formatter": {
  101. "enabled": false,
  102. "lineWidth": 90,
  103. "quoteStyle": "single",
  104. "jsxQuoteStyle": "double",
  105. "quoteProperties": "asNeeded",
  106. "trailingComma": "es5",
  107. "semicolons": "always",
  108. "arrowParentheses": "asNeeded",
  109. "bracketSpacing": false,
  110. "bracketSameLine": false
  111. }
  112. },
  113. "json": {
  114. "formatter": {
  115. "enabled": true
  116. }
  117. },
  118. "overrides": [
  119. {
  120. "include": ["biome.json", "config/tsconfig.*", "tsconfig.json", ".vscode/*"],
  121. "json": {
  122. "parser": {
  123. "allowComments": true,
  124. "allowTrailingCommas": true
  125. }
  126. }
  127. },
  128. {
  129. "include": [
  130. "api-docs/*.ts",
  131. "build-utils/*.ts",
  132. "config/*.ts",
  133. "scripts",
  134. "tests/js/sentry-test/loadFixtures.ts",
  135. "tests/js/jest-pegjs-transform.js",
  136. "tests/js/setup.ts",
  137. "tests/js/test-balancer/index.js",
  138. "*.config.ts"
  139. ],
  140. "linter": {
  141. "rules": {
  142. "nursery": {
  143. "noNodejsModules": "off"
  144. }
  145. }
  146. }
  147. },
  148. {
  149. "include": ["src/sentry/templates/sentry/error-page-embed.js"],
  150. "linter": {
  151. "rules": {
  152. "style": {
  153. "noVar": "off"
  154. }
  155. }
  156. }
  157. },
  158. {
  159. "include": [
  160. "static/app/utils/replays/types.tsx",
  161. "static/app/utils/queryClient.tsx",
  162. "static/app/views/performance/traceDetails/styles.tsx",
  163. "static/app/icons/index.tsx",
  164. "static/app/components/tabs/index.tsx",
  165. "static/app/components/sparklines/line.tsx",
  166. "static/app/types/index.tsx",
  167. "tests/js/sentry-test/reactTestingLibrary.tsx",
  168. "tests/js/sentry-test/index.tsx"
  169. ],
  170. "linter": {
  171. "rules": {
  172. "performance": {
  173. "noBarrelFile": "off"
  174. }
  175. }
  176. }
  177. }
  178. ]
  179. }