{
  "extends": ["next/core-web-vitals", "plugin:import/recommended"],
  "plugins": ["simple-import-sort"],
  "rules": {
    "react/function-component-definition": "error",
    "simple-import-sort/imports": [
      "error",
      {
        "groups": [
          // Side effect imports.
          ["^\\u0000"],
          // Node.js builtins.
          ["^node:"],
          // NPM packages.
          ["^@?\\w"],
          // Internal packages.
          ["^@scandic-hotels/(?!.*\u0000$).*$"],
          // Local imports (lib, constants, etc.), excl. types.
          [
            "^@/constants/?(?!.*\u0000$).*$",
            "^@/env/?(?!.*\u0000$).*$",
            "^@/lib/?(?!.*\u0000$).*$",
            "^@/server/?(?!.*\u0000$).*$",
            "^@/stores/?(?!.*\u0000$).*$"
          ],
          // Local imports (the rest), excl. types.
          ["^@/(?!(types|.*\u0000$)).*$"],
          // Parent imports. Put `..` last.
          // Other relative imports. Put same-folder imports and `.` last.
          [
            "^\\.\\.(?!/?$)",
            "^\\.\\./?$",
            "^\\./(?=.*/)(?!/?$)",
            "^\\.(?!/?$)",
            "^\\./?$"
          ],
          // Style imports.
          ["^(?!\\u0000).+\\.s?css$"],
          // Node.js builtins and NPM packages type imports.
          ["^node:.*\\u0000$", "^@?\\w.*\\u0000$"],
          // Local type imports.
          [
            "^@scandichotels/.*\\u0000$",
            "^@/types/.*",
            "^@/.*\\u0000$",
            "^[^.].*\\u0000$",
            "^\\..*\\u0000$"
          ]
        ]
      }
    ],
    "simple-import-sort/exports": "error",
    "import/first": "error",
    "import/newline-after-import": "error",
    "import/no-duplicates": "error"
  }
}
