biome.json 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. },
  25. "complexity": {
  26. "useFlatMap": "error",
  27. "useOptionalChain": "error"
  28. },
  29. "nursery": {
  30. "noDuplicateJsonKeys": "error",
  31. "noNodejsModules": "error",
  32. "useExportType": "error",
  33. "useImportType": "error",
  34. "useShorthandFunctionType": "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. },
  53. "style": {
  54. "noCommaOperator": "error",
  55. "noShoutyConstants": "error",
  56. "noParameterProperties": "error",
  57. "noVar": "error",
  58. "useConst": "error"
  59. }
  60. }
  61. },
  62. "files": {
  63. "ignoreUnknown": true,
  64. "ignore": [
  65. "**/*/trace.json",
  66. "static/app/data/world.json",
  67. "**/*.sourcemap.js",
  68. "**/*.min.js",
  69. "fixtures"
  70. ]
  71. },
  72. "formatter": {
  73. "enabled": true,
  74. "formatWithErrors": true,
  75. "indentStyle": "space",
  76. "indentWidth": 2,
  77. "lineEnding": "lf",
  78. "ignore": ["tests/**/*.json"]
  79. },
  80. "javascript": {
  81. "formatter": {
  82. "enabled": false,
  83. "lineWidth": 90,
  84. "quoteStyle": "single",
  85. "jsxQuoteStyle": "double",
  86. "quoteProperties": "asNeeded",
  87. "trailingComma": "es5",
  88. "semicolons": "always",
  89. "arrowParentheses": "asNeeded",
  90. "bracketSpacing": false,
  91. "bracketSameLine": false
  92. }
  93. },
  94. "json": {
  95. "formatter": {
  96. "enabled": true
  97. },
  98. "parser": {
  99. "allowComments": true,
  100. "allowTrailingCommas": true
  101. }
  102. },
  103. "overrides": [
  104. {
  105. "include": [
  106. "api-docs/*.ts",
  107. "build-utils/*.ts",
  108. "config/webpack.chartcuterie.config.ts",
  109. "scripts",
  110. "tests/js/sentry-test/loadFixtures.ts",
  111. "tests/js/jest-pegjs-transform.js",
  112. "tests/js/setup.ts",
  113. "tests/js/test-balancer/index.js",
  114. "*.config.ts"
  115. ],
  116. "linter": {
  117. "rules": {
  118. "nursery": {
  119. "noNodejsModules": "off"
  120. }
  121. }
  122. }
  123. },
  124. {
  125. "include": ["src/sentry/templates/sentry/error-page-embed.js"],
  126. "linter": {
  127. "rules": {
  128. "style": {
  129. "noVar": "off"
  130. }
  131. }
  132. }
  133. }
  134. ]
  135. }