biome.json 4.2 KB

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