biome.json 4.2 KB

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