biome.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. "!bin",
  22. "!tsconfig.base.json",
  23. "!apps/app/src/styles/prebuilt",
  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. "noParameterAssign": "warn"
  65. },
  66. "suspicious": {
  67. "noConsole": "error",
  68. "noAlert": "error",
  69. "useAwait": "warn"
  70. },
  71. "performance": {
  72. "noAwaitInLoops": "warn"
  73. },
  74. "correctness": {
  75. "useUniqueElementIds": "warn"
  76. }
  77. }
  78. },
  79. "javascript": {
  80. "formatter": {
  81. "quoteStyle": "single"
  82. },
  83. "parser": {
  84. "unsafeParameterDecoratorsEnabled": true
  85. }
  86. },
  87. "overrides": [
  88. {
  89. "includes": ["apps/pdf-converter/**", "./apps/slackbot-proxy/**"],
  90. "linter": {
  91. "rules": {
  92. "style": {
  93. "useImportType": "off"
  94. }
  95. }
  96. }
  97. },
  98. {
  99. "includes": ["apps/app/**"],
  100. "linter": {
  101. "rules": {
  102. "style": {
  103. "noRestrictedImports": {
  104. "level": "error",
  105. "options": {
  106. "paths": {
  107. "axios": "Please use src/utils/axios instead."
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
  114. },
  115. {
  116. "includes": [
  117. "apps/app/src/stores-universal/**",
  118. "apps/app/src/utils/**",
  119. "apps/app/src/models/**",
  120. "apps/app/src/services/**",
  121. "apps/app/src/pages/**",
  122. "apps/app/src/server/**",
  123. "apps/app/src/components/**"
  124. ],
  125. "linter": {
  126. "rules": {
  127. "style": {
  128. "noRestrictedImports": {
  129. "level": "error",
  130. "options": {
  131. "paths": {
  132. "axios": "Please use src/utils/axios instead."
  133. },
  134. "patterns": [
  135. {
  136. "group": ["~/client/**", "**/client/**", "client/**"],
  137. "message": "Importing from client/ directories is restricted."
  138. }
  139. ]
  140. }
  141. }
  142. }
  143. }
  144. }
  145. },
  146. {
  147. "includes": ["apps/app/src/server/models/**"],
  148. "plugins": ["apps/app/src/server/models/.biome/plugins/no-populate.grit"]
  149. }
  150. ]
  151. }