{
  "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
  "vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
  },
  "files": {
    "ignoreUnknown": false,
    "includes": ["src/**"]
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 80
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "a11y": {
        "noStaticElementInteractions": "warn",
        "noSvgWithoutTitle": "warn",
        "useAltText": "warn",
        "useMediaCaption": "off",
        "useValidAnchor": "off",
        "useValidAriaRole": "warn",
        "useAriaPropsSupportedByRole": "warn",
        "useIframeTitle": "warn",
        "useKeyWithClickEvents": "warn"
      },
      "complexity": {
        "noAdjacentSpacesInRegex": "error",
        "noExtraBooleanCast": "error",
        "noUselessConstructor": "error",
        "noUselessCatch": "warn",
        "noUselessEscapeInRegex": "warn",
        "useLiteralKeys": "off"
      },
      "correctness": {
        "noChildrenProp": "error",
        "noConstantCondition": "error",
        "noConstAssign": "off",
        "noConstructorReturn": "warn",
        "noEmptyCharacterClassInRegex": "error",
        "noEmptyPattern": "warn",
        "noGlobalObjectCalls": "off",
        "noInnerDeclarations": "error",
        "noInvalidConstructorSuper": "off",
        "noInvalidUseBeforeDeclaration": "off",
        "noNonoctalDecimalEscape": "error",
        "noPrecisionLoss": "error",
        "noSelfAssign": "warn",
        "noSetterReturn": "off",
        "noSwitchDeclarations": "warn",
        "noUndeclaredDependencies": "off",
        "noUndeclaredVariables": "off",
        "noUnreachable": "off",
        "noUnreachableSuper": "off",
        "noUnsafeFinally": "error",
        // Should be error
        "noUnsafeOptionalChaining": "warn",
        "noUnusedLabels": "error",
        "noUnusedVariables": "warn",
        "noVoidTypeReturn": "warn",
        // Should be error
        "useExhaustiveDependencies": "warn",
        // Should be error
        "useHookAtTopLevel": "warn",
        "useIsNan": "error",
        "useJsxKeyInIterable": "error",
        "useParseIntRadix": "off",
        "useValidForDirection": "error",
        "useValidTypeof": "off",
        "useYield": "error"
      },
      "nursery": {
        "noIncrementDecrement": "off",
        "noReturnAssign": "off",
        "noShadow": "off",
        "noUnknownAttribute": "error",
        "noUnresolvedImports": "off",
        "noUnusedExpressions": "off"
      },
      "security": {
        "noBlankTarget": "error",
        "noDangerouslySetInnerHtml": "warn",
        "noDangerouslySetInnerHtmlWithChildren": "error"
      },
      "style": {
        "noMagicNumbers": "off",
        "noNestedTernary": "warn",
        "noParameterAssign": "off",
        "noRestrictedImports": {
          "level": "error",
          "options": {
            "paths": {
              "react-beautiful-dnd": {
                "message": "Deprecated: use SortableList or SortableListComposition from @material-hu/components/composed-components instead."
              },
              "react-pdf": {
                "message": "Use 'src/config/react-pdf' instead of 'react-pdf' directly"
              },
              "notistack": {
                "message": "Import from '@material-hu/components/design-system/Snackbar' instead of 'notistack' directly"
              },
              "@mui/material": { "message": "Use imports from '@material-hu/mui' instead." },
              "@mui/system": { "message": "Use imports from '@material-hu/mui' instead." },
              "@mui/lab": { "message": "Use imports from '@material-hu/mui/lab' instead." },
              "@mui/icons-material": { "message": "Use imports from '@material-hu/icons/material' instead." }
            }
          }
        },
        "useArrayLiterals": "error",
        "useBlockStatements": "off",
        "useConsistentTypeDefinitions": {
          "options": {
            "style": "type"
          }
        },
        "useDefaultParameterLast": "error",
        "useImportType": {
          "level": "on",
          "options": {
            "style": "inlineType"
          }
        },
        "useNamingConvention": "off",
        "useNodejsImportProtocol": "error",
        "useThrowOnlyError": "off"
      },
      "suspicious": {
        "noArrayIndexKey": "off",
        "noAssignInExpressions": "warn",
        "noAsyncPromiseExecutor": "error",
        "noCatchAssign": "error",
        "noClassAssign": "error",
        "noCommentText": "error",
        "noCompareNegZero": "error",
        "noConsole": {
          "level": "error",
          "options": {
            "allow": ["error"]
          }
        },
        "noControlCharactersInRegex": "error",
        "noDebugger": "error",
        "noDoubleEquals": "warn",
        "noDuplicateCase": "warn",
        "noDuplicateClassMembers": "error",
        "noDuplicateElseIf": "error",
        "noDuplicateJsxProps": "error",
        "noDuplicateObjectKeys": "off",
        "noDuplicateParameters": "off",
        "noEmptyBlockStatements": "warn",
        "noExplicitAny": "warn",
        "noFallthroughSwitchClause": "error",
        "noFunctionAssign": "off",
        "noGlobalAssign": "error",
        "noImplicitAnyLet": "warn",
        "noImportAssign": "off",
        "noIrregularWhitespace": "error",
        "noMisleadingCharacterClass": "error",
        "noNonNullAssertedOptionalChain": "warn",
        "noPrototypeBuiltins": "warn",
        "noRedeclare": "off",
        "noSelfCompare": "warn",
        "noShadowRestrictedNames": "warn",
        "noSparseArray": "warn",
        "noThenProperty": "warn",
        "noUnsafeNegation": "off",
        "noUselessRegexBackrefs": "error",
        "noWith": "error",
        "useAwait": "off",
        "useBiomeIgnoreFolder": "error",
        "useGetterReturn": "off",
        "useIterableCallbackReturn": "warn"
      }
    }
  },
  "javascript": {
    "formatter": {
      "attributePosition": "multiline",
      "arrowParentheses": "asNeeded",
      "quoteStyle": "single",
      "semicolons": "always",
      "lineWidth": 80
    }
  },
  "assist": {
    "enabled": true,
    "actions": {
      "source": {
        "useSortedAttributes": "off",
        "organizeImports": {
          "level": "on",
          "options": {
            "groups": [
              ["react", "react-*", "react-*/**"],
              ":BLANK_LINE:",
              [
                ":PACKAGE:",
                "@*/**",
                "!src/**",
                "!@material-hu/**",
                "!@material-hu/components/**"
              ],
              ["@material-hu/**", "!@material-hu/components/**"],
              ":BLANK_LINE:",
              ["@material-hu/components", "@material-hu/components/**/*"],
              ":BLANK_LINE:",
              ["src", "src/**", "!src/components", "!src/components/**"],
              ":BLANK_LINE:",
              ["src/components", "src/components/**"],
              ":BLANK_LINE:",
              ["../**"],
              ":BLANK_LINE:",
              ["./**", "!./index", "!./index/**"]
            ]
          }
        }
      }
    }
  }
}
