biome.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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": true,
  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. "parser": {
  105. "allowComments": true,
  106. "allowTrailingCommas": true
  107. }
  108. },
  109. "overrides": [
  110. {
  111. "include": [
  112. "api-docs/*.ts",
  113. "build-utils/*.ts",
  114. "config/webpack.chartcuterie.config.ts",
  115. "scripts",
  116. "tests/js/sentry-test/loadFixtures.ts",
  117. "tests/js/jest-pegjs-transform.js",
  118. "tests/js/setup.ts",
  119. "tests/js/test-balancer/index.js",
  120. "*.config.ts"
  121. ],
  122. "linter": {
  123. "rules": {
  124. "nursery": {
  125. "noNodejsModules": "off"
  126. }
  127. }
  128. }
  129. },
  130. {
  131. "include": ["src/sentry/templates/sentry/error-page-embed.js"],
  132. "linter": {
  133. "rules": {
  134. "style": {
  135. "noVar": "off"
  136. }
  137. }
  138. }
  139. }
  140. ]
  141. }