biome.json 3.6 KB

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