biome.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. "a11y": {
  25. "recommended": true,
  26. "noAutofocus": "off",
  27. "noLabelWithoutControl": "off",
  28. "noNoninteractiveElementInteractions": "off",
  29. "noNoninteractiveTabindex": "off",
  30. "noRedundantAlt": "off",
  31. "noStaticElementInteractions": "off",
  32. "noSvgWithoutTitle": "off",
  33. "useAriaPropsSupportedByRole": "off",
  34. "useButtonType": "off",
  35. "useFocusableInteractive": "off",
  36. "useKeyWithClickEvents": "off",
  37. "useMediaCaption": "off",
  38. "useSemanticElements": "off",
  39. "useValidAnchor": "off"
  40. },
  41. "complexity": {
  42. "noExtraBooleanCast": "error",
  43. "noUselessCatch": "error"
  44. },
  45. "correctness": {
  46. "useUniqueElementIds": "off",
  47. "noConstAssign": "error",
  48. "noConstantCondition": "error",
  49. "noEmptyCharacterClassInRegex": "error",
  50. "noEmptyPattern": "error",
  51. "noGlobalObjectCalls": "error",
  52. "noInnerDeclarations": "error",
  53. "noInvalidConstructorSuper": "error",
  54. "noNonoctalDecimalEscape": "error",
  55. "noPrecisionLoss": "error",
  56. "noSelfAssign": "error",
  57. "noSetterReturn": "error",
  58. "noSwitchDeclarations": "error",
  59. "noUndeclaredVariables": "error",
  60. "noUnreachable": "error",
  61. "noUnreachableSuper": "error",
  62. "useIsNan": "error",
  63. "useValidForDirection": "error",
  64. "noUnusedImports": "error"
  65. },
  66. "suspicious": {
  67. "noAsyncPromiseExecutor": "error",
  68. "noCatchAssign": "error",
  69. "noClassAssign": "error",
  70. "noCompareNegZero": "error",
  71. "noControlCharactersInRegex": "error",
  72. "noDebugger": "error",
  73. "noDuplicateCase": "error",
  74. "noDuplicateClassMembers": "error",
  75. "noDuplicateObjectKeys": "error",
  76. "noDuplicateParameters": "error",
  77. "noEmptyBlockStatements": "error",
  78. "noFallthroughSwitchClause": "error",
  79. "noFunctionAssign": "error",
  80. "noGlobalAssign": "error",
  81. "noImportAssign": "error",
  82. "noMisleadingCharacterClass": "error",
  83. "noPrototypeBuiltins": "error",
  84. "noRedeclare": "error",
  85. "noShadowRestrictedNames": "error",
  86. "noUnsafeNegation": "error",
  87. "useGetterReturn": "error",
  88. "noConsole": {
  89. "level": "error",
  90. "fix": "none",
  91. "options": {
  92. "allow": ["warn", "error"]
  93. }
  94. }
  95. }
  96. }
  97. },
  98. "javascript": {
  99. "globals": [
  100. "jest",
  101. "describe",
  102. "it",
  103. "test",
  104. "expect",
  105. "beforeAll",
  106. "beforeEach",
  107. "afterAll",
  108. "afterEach",
  109. "fail"
  110. ],
  111. "formatter": {
  112. "quoteStyle": "single",
  113. "jsxQuoteStyle": "double",
  114. "quoteProperties": "asNeeded",
  115. "trailingCommas": "es5",
  116. "semicolons": "asNeeded",
  117. "arrowParentheses": "always",
  118. "bracketSpacing": true,
  119. "bracketSameLine": false,
  120. "attributePosition": "auto"
  121. }
  122. },
  123. "json": {
  124. "formatter": {
  125. "indentStyle": "space",
  126. "indentWidth": 2
  127. }
  128. },
  129. "css": {
  130. "parser": {
  131. "cssModules": true,
  132. "allowWrongLineComments": true
  133. },
  134. "formatter": {
  135. "enabled": true,
  136. "indentStyle": "space",
  137. "indentWidth": 2
  138. },
  139. "linter": {
  140. "enabled": false
  141. }
  142. },
  143. "assist": {
  144. "enabled": false,
  145. "actions": {
  146. "source": {
  147. "organizeImports": "off"
  148. }
  149. }
  150. },
  151. "overrides": [
  152. {
  153. "includes": ["e2e/**/*"],
  154. "linter": {
  155. "rules": {
  156. "suspicious": {
  157. "noConsole": "off"
  158. }
  159. }
  160. }
  161. }
  162. ]
  163. }