biome.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. ]
  77. },
  78. "formatter": {
  79. "enabled": false,
  80. "formatWithErrors": true,
  81. "indentStyle": "space",
  82. "indentWidth": 2,
  83. "lineEnding": "lf",
  84. "ignore": ["tests/**/*.json"]
  85. },
  86. "javascript": {
  87. "formatter": {
  88. "enabled": false,
  89. "lineWidth": 90,
  90. "quoteStyle": "single",
  91. "jsxQuoteStyle": "double",
  92. "quoteProperties": "asNeeded",
  93. "trailingComma": "es5",
  94. "semicolons": "always",
  95. "arrowParentheses": "asNeeded",
  96. "bracketSpacing": false,
  97. "bracketSameLine": false
  98. }
  99. },
  100. "json": {
  101. "formatter": {
  102. "enabled": true
  103. }
  104. },
  105. "overrides": [
  106. {
  107. "include": [
  108. "biome.json",
  109. "config/tsconfig.*",
  110. "tsconfig.json",
  111. ".vscode/*"
  112. ],
  113. "json": {
  114. "parser": {
  115. "allowComments": true,
  116. "allowTrailingCommas": true
  117. }
  118. }
  119. },
  120. {
  121. "include": [
  122. "api-docs/*.ts",
  123. "build-utils/*.ts",
  124. "config/*.ts",
  125. "scripts",
  126. "tests/js/sentry-test/loadFixtures.ts",
  127. "tests/js/jest-pegjs-transform.js",
  128. "tests/js/setup.ts",
  129. "tests/js/test-balancer/index.js",
  130. "*.config.ts"
  131. ],
  132. "linter": {
  133. "rules": {
  134. "nursery": {
  135. "noNodejsModules": "off"
  136. }
  137. }
  138. }
  139. },
  140. {
  141. "include": ["src/sentry/templates/sentry/error-page-embed.js"],
  142. "linter": {
  143. "rules": {
  144. "style": {
  145. "noVar": "off"
  146. }
  147. }
  148. }
  149. }
  150. ]
  151. }