biome.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {
  2. "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
  3. "files": {
  4. "includes": [
  5. "**",
  6. "!**/dist",
  7. "!**/node_modules",
  8. "!**/.pnpm-store",
  9. "!**/coverage",
  10. "!**/vite.config.ts.timestamp-*",
  11. "!**/vite.server.config.ts.timestamp-*",
  12. "!**/vite.client.config.ts.timestamp-*",
  13. "!**/.turbo",
  14. "!**/.vscode",
  15. "!**/turbo.json",
  16. "!**/.claude",
  17. "!**/.next",
  18. "!**/.terraform",
  19. "!bin",
  20. "!tsconfig.base.json",
  21. "!**/.devcontainer",
  22. "!**/.eslintrc.js",
  23. "!**/.stylelintrc.json",
  24. "!**/package.json",
  25. "!apps/app/src/styles/prebuilt",
  26. "!apps/app/tmp",
  27. "!apps/pdf-converter/specs",
  28. "!apps/slackbot-proxy/src/public/bootstrap",
  29. "!packages/pdf-converter-client/src/index.ts",
  30. "!packages/pdf-converter-client/specs",
  31. "!apps/app/src/client/components/Admin/*.ts",
  32. "!apps/app/src/client/components/Admin/*.tsx",
  33. "!apps/app/src/client/components/Admin/*.scss",
  34. "!apps/app/src/client/components/Admin/AdminHome",
  35. "!apps/app/src/client/components/Admin/AuditLog",
  36. "!apps/app/src/client/components/Admin/Common",
  37. "!apps/app/src/client/components/Admin/Customize",
  38. "!apps/app/src/client/components/Admin/ElasticsearchManagement",
  39. "!apps/app/src/client/components/Admin/ExportArchiveData",
  40. "!apps/app/src/client/components/Admin/ImportData",
  41. "!apps/app/src/client/components/Admin/LegacySlackIntegration",
  42. "!apps/app/src/client/components/Admin/MarkdownSetting",
  43. "!apps/app/src/client/components/Admin/Notification",
  44. "!apps/app/src/client/components/Admin/Security"
  45. ]
  46. },
  47. "formatter": {
  48. "enabled": true,
  49. "indentStyle": "space"
  50. },
  51. "assist": {
  52. "actions": {
  53. "source": {
  54. "organizeImports": {
  55. "level": "on",
  56. "options": {
  57. "groups": [
  58. ["react", "react/**"],
  59. ["next", "next/**"],
  60. [":NODE:", ":PACKAGE:"],
  61. ":BLANK_LINE:",
  62. ["@/**", "^/**"],
  63. ":BLANK_LINE:",
  64. "~/**",
  65. ":BLANK_LINE:",
  66. [":PATH:", "!**/*.css", "!**/*.scss"],
  67. ":BLANK_LINE:",
  68. ["**/*.css", "**/*.scss"]
  69. ]
  70. }
  71. }
  72. }
  73. }
  74. },
  75. "linter": {
  76. "enabled": true,
  77. "rules": {
  78. "recommended": true,
  79. "correctness": {
  80. "useUniqueElementIds": "warn"
  81. }
  82. }
  83. },
  84. "javascript": {
  85. "formatter": {
  86. "quoteStyle": "single"
  87. },
  88. "parser": {
  89. "unsafeParameterDecoratorsEnabled": true
  90. }
  91. },
  92. "overrides": [
  93. {
  94. "includes": ["apps/pdf-converter/**", "./apps/slackbot-proxy/**"],
  95. "linter": {
  96. "rules": {
  97. "style": {
  98. "useImportType": "off"
  99. }
  100. }
  101. }
  102. },
  103. {
  104. "includes": ["apps/app/**"],
  105. "linter": {
  106. "rules": {
  107. "style": {
  108. "noRestrictedImports": {
  109. "level": "error",
  110. "options": {
  111. "paths": {
  112. "axios": "Please use src/utils/axios instead."
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. },
  120. {
  121. "includes": [
  122. "apps/app/src/stores-universal/**",
  123. "apps/app/src/utils/**",
  124. "apps/app/src/models/**",
  125. "apps/app/src/services/**",
  126. "apps/app/src/pages/**",
  127. "apps/app/src/server/**",
  128. "apps/app/src/components/**"
  129. ],
  130. "linter": {
  131. "rules": {
  132. "style": {
  133. "noRestrictedImports": {
  134. "level": "error",
  135. "options": {
  136. "paths": {
  137. "axios": "Please use src/utils/axios instead."
  138. },
  139. "patterns": [
  140. {
  141. "group": ["~/client/**", "**/client/**", "client/**"],
  142. "message": "Importing from client/ directories is restricted."
  143. }
  144. ]
  145. }
  146. }
  147. }
  148. }
  149. }
  150. }
  151. ]
  152. }