biome.json 3.0 KB

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