{"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_NURSERY = {\n    \"unicorn/no-useless-iterator-to-array\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_PEDANTIC = {\n    \"unicorn/consistent-empty-array-spread\": \"error\",\n    \"unicorn/explicit-length-check\": [\n        \"error\",\n        {\n            \"non-zero\": \"greater-than\",\n        },\n    ],\n    \"unicorn/new-for-builtins\": \"error\",\n    \"unicorn/no-instanceof-array\": \"error\",\n    \"unicorn/no-new-buffer\": \"error\",\n    \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n    \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n    \"unicorn/no-unnecessary-slice-end\": \"error\",\n    \"unicorn/no-useless-promise-resolve-reject\": [\n        \"error\",\n        {\n            allowReject: false,\n        },\n    ],\n    \"unicorn/prefer-date-now\": \"error\",\n    \"unicorn/prefer-math-min-max\": \"error\",\n    \"unicorn/prefer-type-error\": \"error\",\n    \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n    \"unicorn/no-length-as-slice-end\": \"error\",\n    \"unicorn/prefer-node-protocol\": \"error\",\n    \"unicorn/prefer-number-properties\": [\n        \"error\",\n        {\n            checkInfinity: true,\n            checkNaN: true,\n        },\n    ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n    \"unicorn/consistent-date-clone\": \"error\",\n    \"unicorn/consistent-existence-index-check\": \"error\",\n    \"unicorn/consistent-template-literal-escape\": \"error\",\n    \"unicorn/custom-error-definition\": \"error\",\n    \"unicorn/empty-brace-spaces\": \"error\",\n    \"unicorn/error-message\": \"error\",\n    \"unicorn/no-array-method-this-argument\": \"error\",\n    \"unicorn/no-unreadable-array-destructuring\": \"error\",\n    \"unicorn/no-useless-collection-argument\": \"error\",\n    \"unicorn/numeric-separators-style\": [\n        \"error\",\n        {\n            binary: {\n                groupLength: 3,\n                minimumDigits: 5,\n            },\n            hexadecimal: {\n                groupLength: 3,\n                minimumDigits: 5,\n            },\n            number: {\n                groupLength: 3,\n                minimumDigits: 5,\n            },\n            octal: {\n                groupLength: 3,\n                minimumDigits: 5,\n            },\n            onlyIfContainsSeparator: false,\n        },\n    ],\n    \"unicorn/prefer-classlist-toggle\": \"error\",\n    \"unicorn/prefer-dom-node-text-content\": \"error\",\n    \"unicorn/prefer-global-this\": \"error\",\n    \"unicorn/prefer-includes\": \"error\",\n    \"unicorn/prefer-keyboard-event-key\": \"error\",\n    \"unicorn/prefer-modern-dom-apis\": \"error\",\n    \"unicorn/prefer-object-from-entries\": \"error\",\n    \"unicorn/prefer-response-static-json\": \"error\",\n    \"unicorn/prefer-string-trim-start-end\": \"error\",\n    \"unicorn/relative-url-style\": [\n        \"error\",\n        \"always\",\n    ],\n    \"unicorn/require-module-attributes\": \"error\",\n    \"unicorn/switch-case-braces\": \"error\",\n    \"unicorn/switch-case-break-position\": \"error\",\n    \"unicorn/text-encoding-identifier-case\": [\n        \"error\",\n        {\n            withDash: true,\n        },\n    ],\n    \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n    \"unicorn/consistent-function-scoping\": \"error\",\n    \"unicorn/no-accessor-recursion\": \"error\",\n    \"unicorn/no-array-reverse\": \"error\",\n    \"unicorn/no-array-sort\": [\n        \"error\",\n        {\n            allowExpressionStatement: true,\n        },\n    ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\n    ...RULES_UNICORN_NURSERY,\n    ...RULES_UNICORN_PEDANTIC,\n    ...RULES_UNICORN_RESTRICTION,\n    ...RULES_UNICORN_STYLE,\n    ...RULES_UNICORN_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n    RULES_UNICORN,\n    RULES_UNICORN_NURSERY,\n    RULES_UNICORN_PEDANTIC,\n    RUL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