biome.json 2.7 KB

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