biome.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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",
  32. "!apps/app/src/client/components/DescendantsPageListModal",
  33. "!apps/app/src/client/components/ItemsTree",
  34. "!apps/app/src/client/components/LoginForm",
  35. "!apps/app/src/client/components/Page",
  36. "!apps/app/src/client/components/PageAttachment",
  37. "!apps/app/src/client/components/PageDeleteModal",
  38. "!apps/app/src/client/components/PageDuplicateModal",
  39. "!apps/app/src/client/components/PageList",
  40. "!apps/app/src/client/components/PageManagement",
  41. "!apps/app/src/client/components/PagePathNavSticky",
  42. "!apps/app/src/client/components/PagePresentationModal",
  43. "!apps/app/src/client/components/PageRenameModal",
  44. "!apps/app/src/client/components/PageSelectModal",
  45. "!apps/app/src/client/components/PageSideContents"
  46. ]
  47. },
  48. "formatter": {
  49. "enabled": true,
  50. "indentStyle": "space"
  51. },
  52. "assist": {
  53. "actions": {
  54. "source": {
  55. "organizeImports": {
  56. "level": "on",
  57. "options": {
  58. "groups": [
  59. ["react", "react/**"],
  60. ["next", "next/**"],
  61. [":NODE:", ":PACKAGE:"],
  62. ":BLANK_LINE:",
  63. ["@/**", "^/**"],
  64. ":BLANK_LINE:",
  65. "~/**",
  66. ":BLANK_LINE:",
  67. [":PATH:", "!**/*.css", "!**/*.scss"],
  68. ":BLANK_LINE:",
  69. ["**/*.css", "**/*.scss"]
  70. ]
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "linter": {
  77. "enabled": true,
  78. "rules": {
  79. "recommended": true,
  80. "correctness": {
  81. "useUniqueElementIds": "warn"
  82. }
  83. }
  84. },
  85. "javascript": {
  86. "formatter": {
  87. "quoteStyle": "single"
  88. },
  89. "parser": {
  90. "unsafeParameterDecoratorsEnabled": true
  91. }
  92. },
  93. "overrides": [
  94. {
  95. "includes": ["apps/pdf-converter/**", "./apps/slackbot-proxy/**"],
  96. "linter": {
  97. "rules": {
  98. "style": {
  99. "useImportType": "off"
  100. }
  101. }
  102. }
  103. },
  104. {
  105. "includes": ["apps/app/**"],
  106. "linter": {
  107. "rules": {
  108. "style": {
  109. "noRestrictedImports": {
  110. "level": "error",
  111. "options": {
  112. "paths": {
  113. "axios": "Please use src/utils/axios instead."
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }
  120. },
  121. {
  122. "includes": [
  123. "apps/app/src/stores-universal/**",
  124. "apps/app/src/utils/**",
  125. "apps/app/src/models/**",
  126. "apps/app/src/services/**",
  127. "apps/app/src/pages/**",
  128. "apps/app/src/server/**",
  129. "apps/app/src/components/**"
  130. ],
  131. "linter": {
  132. "rules": {
  133. "style": {
  134. "noRestrictedImports": {
  135. "level": "error",
  136. "options": {
  137. "paths": {
  138. "axios": "Please use src/utils/axios instead."
  139. },
  140. "patterns": [
  141. {
  142. "group": ["~/client/**", "**/client/**", "client/**"],
  143. "message": "Importing from client/ directories is restricted."
  144. }
  145. ]
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. ]
  153. }