biome.json 3.1 KB

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