4
0

biome.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. {
  2. "$schema": "https://biomejs.dev/schemas/2.3.15/schema.json",
  3. "vcs": {
  4. "enabled": true,
  5. "clientKind": "git",
  6. "useIgnoreFile": true
  7. },
  8. "files": {
  9. "ignoreUnknown": false,
  10. "includes": ["src/**/*", "e2e/**/*", "*.js", "*.ts", "*.jsx", "*.tsx", "*.json"]
  11. },
  12. "formatter": {
  13. "enabled": true,
  14. "formatWithErrors": false,
  15. "indentStyle": "space",
  16. "indentWidth": 2,
  17. "lineWidth": 100,
  18. "lineEnding": "lf"
  19. },
  20. "linter": {
  21. "enabled": true,
  22. "rules": {
  23. "recommended": false,
  24. "complexity": {
  25. "noExtraBooleanCast": "error",
  26. "noUselessCatch": "error"
  27. },
  28. "correctness": {
  29. "useUniqueElementIds": "off",
  30. "noConstAssign": "error",
  31. "noConstantCondition": "error",
  32. "noEmptyCharacterClassInRegex": "error",
  33. "noEmptyPattern": "error",
  34. "noGlobalObjectCalls": "error",
  35. "noInnerDeclarations": "error",
  36. "noInvalidConstructorSuper": "error",
  37. "noNonoctalDecimalEscape": "error",
  38. "noPrecisionLoss": "error",
  39. "noSelfAssign": "error",
  40. "noSetterReturn": "error",
  41. "noSwitchDeclarations": "error",
  42. "noUndeclaredVariables": "error",
  43. "noUnreachable": "error",
  44. "noUnreachableSuper": "error",
  45. "useIsNan": "error",
  46. "useValidForDirection": "error",
  47. "noUnusedImports": "error"
  48. },
  49. "suspicious": {
  50. "noAsyncPromiseExecutor": "error",
  51. "noCatchAssign": "error",
  52. "noClassAssign": "error",
  53. "noCompareNegZero": "error",
  54. "noControlCharactersInRegex": "error",
  55. "noDebugger": "error",
  56. "noDuplicateCase": "error",
  57. "noDuplicateClassMembers": "error",
  58. "noDuplicateObjectKeys": "error",
  59. "noDuplicateParameters": "error",
  60. "noEmptyBlockStatements": "error",
  61. "noFallthroughSwitchClause": "error",
  62. "noFunctionAssign": "error",
  63. "noGlobalAssign": "error",
  64. "noImportAssign": "error",
  65. "noMisleadingCharacterClass": "error",
  66. "noPrototypeBuiltins": "error",
  67. "noRedeclare": "error",
  68. "noShadowRestrictedNames": "error",
  69. "noUnsafeNegation": "error",
  70. "useGetterReturn": "error",
  71. "noConsole": {
  72. "level": "error",
  73. "fix": "none",
  74. "options": {
  75. "allow": ["warn", "error"]
  76. }
  77. }
  78. }
  79. }
  80. },
  81. "javascript": {
  82. "globals": [
  83. "jest",
  84. "describe",
  85. "it",
  86. "test",
  87. "expect",
  88. "beforeAll",
  89. "beforeEach",
  90. "afterAll",
  91. "afterEach",
  92. "fail"
  93. ],
  94. "formatter": {
  95. "quoteStyle": "single",
  96. "jsxQuoteStyle": "double",
  97. "quoteProperties": "asNeeded",
  98. "trailingCommas": "es5",
  99. "semicolons": "asNeeded",
  100. "arrowParentheses": "always",
  101. "bracketSpacing": true,
  102. "bracketSameLine": false,
  103. "attributePosition": "auto"
  104. }
  105. },
  106. "json": {
  107. "formatter": {
  108. "indentStyle": "space",
  109. "indentWidth": 2
  110. }
  111. },
  112. "css": {
  113. "parser": {
  114. "cssModules": true,
  115. "allowWrongLineComments": true
  116. },
  117. "formatter": {
  118. "enabled": true,
  119. "indentStyle": "space",
  120. "indentWidth": 2
  121. },
  122. "linter": {
  123. "enabled": false
  124. }
  125. },
  126. "assist": {
  127. "enabled": false,
  128. "actions": {
  129. "source": {
  130. "organizeImports": "off"
  131. }
  132. }
  133. },
  134. "overrides": [
  135. {
  136. "includes": ["e2e/**/*"],
  137. "linter": {
  138. "rules": {
  139. "suspicious": {
  140. "noConsole": "off"
  141. }
  142. }
  143. }
  144. }
  145. ]
  146. }