/ biome.json
biome.json
1 { 2 "$schema": "https://biomejs.dev/schemas/2.3.10/schema.json", 3 "files": { 4 "includes": [ 5 "**", 6 "!**/*.json", 7 "!**/*.css", 8 "!**/*.scss", 9 "!**/*.d.scss.ts", 10 "!**/src/gql/**", 11 "!**/docs/release-notes/**", 12 "!**/packages/@nextui-org/**" 13 ] 14 }, 15 "vcs": { 16 "enabled": true, 17 "clientKind": "git", 18 "useIgnoreFile": true, 19 "defaultBranch": "master" 20 }, 21 "assist": { 22 "actions": { 23 "source": { 24 "organizeImports": { 25 "level": "on", 26 "options": { 27 "identifierOrder": "lexicographic", 28 "groups": [ 29 ":NODE:", 30 ":PACKAGE:", 31 ":BLANK_LINE:", 32 "@/**", 33 ":BLANK_LINE:", 34 [":PATH:", "!./*.{css,scss}"], 35 ":BLANK_LINE:", 36 "./*.{css,scss}" 37 ] 38 } 39 } 40 } 41 } 42 }, 43 "formatter": { 44 "formatWithErrors": true, 45 "indentStyle": "tab", 46 "lineWidth": 100 47 }, 48 "javascript": { 49 "formatter": { 50 "quoteStyle": "single", 51 "arrowParentheses": "asNeeded", 52 "lineWidth": 100 53 } 54 }, 55 "json": { 56 "formatter": { 57 "enabled": false 58 } 59 }, 60 "linter": { 61 "enabled": true, 62 "rules": { 63 "recommended": false, 64 "a11y": { 65 "noAccessKey": "error", 66 "noAriaHiddenOnFocusable": "error", 67 "noAriaUnsupportedElements": "error", 68 "noHeaderScope": "error", 69 "noInteractiveElementToNoninteractiveRole": "error", 70 "noNoninteractiveElementToInteractiveRole": "error", 71 "noNoninteractiveTabindex": "error", 72 "noPositiveTabindex": "error", 73 "noSvgWithoutTitle": "error", 74 "useAltText": "error", 75 "useAriaPropsForRole": "error", 76 "useButtonType": "error", 77 "useHtmlLang": "error", 78 "useKeyWithClickEvents": "error", 79 "useKeyWithMouseEvents": "error", 80 "useValidAriaProps": "error", 81 "useValidLang": "error" 82 }, 83 "complexity": { 84 "noBannedTypes": "error", 85 "noExtraBooleanCast": "warn", 86 "noForEach": "warn", 87 "noThisInStatic": "warn", 88 "noUselessEmptyExport": "warn", 89 "noUselessFragments": "warn", 90 "noUselessRename": "warn", 91 "noUselessSwitchCase": "warn", 92 "noUselessTypeConstraint": "warn", 93 "noUselessTernary": "warn", 94 "useArrowFunction": "warn", 95 "useFlatMap": "warn", 96 "useLiteralKeys": "warn", 97 "useOptionalChain": "warn", 98 "noArguments": "error" 99 }, 100 "correctness": { 101 "noChildrenProp": "warn", 102 "noInnerDeclarations": "error", 103 "noPrecisionLoss": "error", 104 "noSelfAssign": "warn", 105 "noStringCaseMismatch": "error", 106 "noSwitchDeclarations": "error", 107 "noUnreachable": "warn", 108 "noUnsafeFinally": "error", 109 "noUnsafeOptionalChaining": "error", 110 "noUnusedLabels": "warn", 111 "noVoidElementsWithChildren": "error", 112 "useJsxKeyInIterable": "error", 113 "useValidForDirection": "error" 114 }, 115 "performance": { 116 "noAccumulatingSpread": "error" 117 }, 118 "security": { 119 "noDangerouslySetInnerHtml": "error", 120 "noDangerouslySetInnerHtmlWithChildren": "error", 121 "noGlobalEval": "error", 122 "noBlankTarget": "error" 123 }, 124 "style": { 125 "noInferrableTypes": "warn", 126 "noNegationElse": "warn", 127 "noNonNullAssertion": "warn", 128 "noRestrictedGlobals": "error", 129 "noUnusedTemplateLiteral": "warn", 130 "noUselessElse": "warn", 131 "useAsConstAssertion": "warn", 132 "useBlockStatements": "warn", 133 "useCollapsedElseIf": "warn", 134 "useConst": "warn", 135 "useDefaultParameterLast": "warn", 136 "useEnumInitializers": "error", 137 "useExportType": "error", 138 "useFilenamingConvention": "warn", 139 "useFragmentSyntax": "warn", 140 "useLiteralEnumMembers": "error", 141 "useNumberNamespace": "warn", 142 "useSelfClosingElements": "warn", 143 "useShorthandAssign": "warn", 144 "useConsistentArrayType": { "level": "warn", "options": { "syntax": "shorthand" } } 145 }, 146 "suspicious": { 147 "noArrayIndexKey": "error", 148 "noAsyncPromiseExecutor": "error", 149 "useAwait": "warn", 150 "noCommentText": "error", 151 "noConstEnum": "error", 152 "noDebugger": "warn", 153 "noDoubleEquals": "error", 154 "noEmptyInterface": "warn", 155 "noExtraNonNullAssertion": "warn", 156 "noFallthroughSwitchClause": "error", 157 "noGlobalIsFinite": "error", 158 "noGlobalIsNan": "error", 159 "noImplicitAnyLet": "error", 160 "noMisleadingInstantiator": "error", 161 "noPrototypeBuiltins": "error", 162 "noSparseArray": "error", 163 "noSuspiciousSemicolonInJsx": "error", 164 "noThenProperty": "error", 165 "noUnsafeNegation": "error", 166 "useDefaultSwitchClauseLast": "warn", 167 "useNamespaceKeyword": "warn", 168 "noVar": "error", 169 "noConsole": { "level": "warn", "options": { "allow": ["log"] } } 170 }, 171 "nursery": { 172 "useSortedClasses": "warn" 173 } 174 } 175 }, 176 "overrides": [ 177 { 178 "includes": ["**/components/**/*/index.tsx"], 179 "linter": { 180 "rules": { 181 "style": { 182 "noDefaultExport": "warn" 183 } 184 } 185 } 186 }, 187 { 188 "includes": ["**/utils/**", "**/packages/publish-extension/**"], 189 "linter": { 190 "rules": { 191 "suspicious": { 192 "noConsole": { "level": "off", "options": { "allow": ["log"] } } 193 } 194 } 195 } 196 } 197 ] 198 }