biome.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. {
  2. "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  3. "files": {
  4. "includes": [
  5. "**",
  6. "!**/.pnpm-store",
  7. "!**/.terraform",
  8. "!**/coverage",
  9. "!**/dist",
  10. "!**/.next",
  11. "!**/node_modules",
  12. "!**/vite.*.ts.timestamp-*",
  13. "!**/*.grit",
  14. "!**/turbo.json",
  15. "!**/.devcontainer",
  16. "!**/.stylelintrc.json",
  17. "!**/package.json",
  18. "!.turbo",
  19. "!.vscode",
  20. "!.claude",
  21. "!tsconfig.base.json",
  22. "!apps/app/src/styles/prebuilt",
  23. "!apps/app/next-env.d.ts",
  24. "!apps/app/tmp",
  25. "!apps/pdf-converter/specs",
  26. "!apps/slackbot-proxy/src/public/bootstrap",
  27. "!packages/pdf-converter-client/src/index.ts",
  28. "!packages/pdf-converter-client/specs"
  29. ]
  30. },
  31. "formatter": {
  32. "enabled": true,
  33. "indentStyle": "space"
  34. },
  35. "assist": {
  36. "actions": {
  37. "source": {
  38. "organizeImports": {
  39. "level": "on",
  40. "options": {
  41. "groups": [
  42. ["react", "react/**"],
  43. ["next", "next/**"],
  44. [":NODE:", ":PACKAGE:"],
  45. ":BLANK_LINE:",
  46. ["@/**", "^/**"],
  47. ":BLANK_LINE:",
  48. "~/**",
  49. ":BLANK_LINE:",
  50. [":PATH:", "!**/*.css", "!**/*.scss"],
  51. ":BLANK_LINE:",
  52. ["**/*.css", "**/*.scss"]
  53. ]
  54. }
  55. }
  56. }
  57. }
  58. },
  59. "linter": {
  60. "enabled": true,
  61. "rules": {
  62. "recommended": true,
  63. "style": {
  64. "useThrowOnlyError": "error",
  65. "noParameterAssign": "warn",
  66. "noDefaultExport": "warn"
  67. },
  68. "suspicious": {
  69. "noConsole": "error",
  70. "noAlert": "error",
  71. "noVar": "error",
  72. "useAwait": "warn"
  73. },
  74. "performance": {
  75. "noAwaitInLoops": "warn"
  76. },
  77. "correctness": {
  78. "useUniqueElementIds": "warn"
  79. },
  80. "nursery": {
  81. "useMaxParams": "warn"
  82. }
  83. }
  84. },
  85. "javascript": {
  86. "formatter": {
  87. "quoteStyle": "single"
  88. },
  89. "parser": {
  90. "unsafeParameterDecoratorsEnabled": true
  91. }
  92. },
  93. "overrides": [
  94. {
  95. "includes": ["**/vite*.config.ts", "vitest*.config.ts"],
  96. "linter": {
  97. "rules": {
  98. "style": {
  99. "noDefaultExport": "off"
  100. }
  101. }
  102. }
  103. },
  104. {
  105. "includes": ["bin/**"],
  106. "linter": {
  107. "rules": {
  108. "suspicious": {
  109. "noConsole": "off"
  110. }
  111. }
  112. }
  113. },
  114. {
  115. "includes": ["bin/data-migrations/**"],
  116. "linter": {
  117. "rules": {
  118. "suspicious": {
  119. "noVar": "off"
  120. },
  121. "correctness": {
  122. "noInnerDeclarations": "off"
  123. }
  124. }
  125. }
  126. },
  127. {
  128. "includes": ["apps/pdf-converter/**", "./apps/slackbot-proxy/**"],
  129. "linter": {
  130. "rules": {
  131. "style": {
  132. "useImportType": "off"
  133. }
  134. }
  135. }
  136. },
  137. {
  138. "includes": ["apps/app/**"],
  139. "linter": {
  140. "rules": {
  141. "style": {
  142. "noRestrictedImports": {
  143. "level": "error",
  144. "options": {
  145. "paths": {
  146. "axios": "Please use src/utils/axios instead."
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. },
  154. {
  155. "includes": [
  156. "apps/app/src/stores-universal/**",
  157. "apps/app/src/utils/**",
  158. "apps/app/src/models/**",
  159. "apps/app/src/services/**",
  160. "apps/app/src/pages/**",
  161. "apps/app/src/server/**",
  162. "apps/app/src/components/**"
  163. ],
  164. "linter": {
  165. "rules": {
  166. "style": {
  167. "noRestrictedImports": {
  168. "level": "error",
  169. "options": {
  170. "paths": {
  171. "axios": "Please use src/utils/axios instead."
  172. },
  173. "patterns": [
  174. {
  175. "group": ["~/client/**", "**/client/**", "client/**"],
  176. "message": "Importing from client/ directories is restricted."
  177. }
  178. ]
  179. }
  180. }
  181. }
  182. }
  183. }
  184. },
  185. {
  186. "includes": ["apps/app/src/server/models/**"],
  187. "plugins": ["apps/app/src/server/models/.biome/plugins/no-populate.grit"]
  188. }
  189. ]
  190. }