{"version":3,"file":"eslint.mjs","names":[],"sources":["../../../../src/presets/common/rules/eslint.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_ESLINT_NURSERY = {\n    \"no-useless-assignment\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PEDANTIC = {\n    eqeqeq: [\n        \"error\",\n        \"always\",\n    ],\n    \"no-array-constructor\": \"error\",\n    \"no-case-declarations\": \"error\",\n    \"no-constructor-return\": \"error\",\n    \"no-else-return\": [\n        \"error\",\n        {\n            allowElseIf: false,\n        },\n    ],\n    \"no-fallthrough\": [\n        \"error\",\n        {\n            allowEmptyCase: true,\n        },\n    ],\n    \"no-loop-func\": \"error\",\n    \"no-new-wrappers\": \"error\",\n    \"no-object-constructor\": \"error\",\n    \"no-promise-executor-return\": [\n        \"error\",\n        {\n            allowVoid: false,\n        },\n    ],\n    \"no-redeclare\": [\n        \"error\",\n        {\n            builtinGlobals: true,\n        },\n    ],\n    \"no-useless-return\": \"error\",\n    radix: \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_PERF = {\n    \"no-useless-call\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_RESTRICTION = {\n    \"no-div-regex\": \"error\",\n    \"no-undefined\": \"error\",\n    \"no-use-before-define\": [\n        \"error\",\n        {\n            allowNamedExports: true,\n            classes: true,\n            enums: true,\n            functions: false,\n            ignoreTypeReferences: true,\n            typedefs: true,\n            variables: false,\n        },\n    ],\n    \"no-var\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_STYLE = {\n    \"default-case-last\": \"error\",\n    \"func-name-matching\": [\n        \"error\",\n        \"always\",\n    ],\n    \"grouped-accessor-pairs\": [\n        \"error\",\n        \"getBeforeSet\",\n        {\n            enforceForTSTypes: true,\n        },\n    ],\n    \"no-extra-label\": \"error\",\n    \"no-implicit-coercion\": \"error\",\n    \"no-label-var\": \"error\",\n    \"no-multi-assign\": [\n        \"error\",\n        {\n            ignoreNonDeclaration: false,\n        },\n    ],\n    \"no-template-curly-in-string\": \"error\",\n    \"no-useless-computed-key\": [\n        \"error\",\n        {\n            enforceForClassMembers: true,\n        },\n    ],\n    \"prefer-const\": [\n        \"error\",\n        {\n            destructuring: \"all\",\n            // avoid conflicts with `no-use-before-define`\n            ignoreReadBeforeAssign: true,\n        },\n    ],\n    \"prefer-promise-reject-errors\": [\n        \"error\",\n        {\n            allowEmptyReject: false,\n        },\n    ],\n    \"prefer-rest-params\": \"error\",\n    \"prefer-spread\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT_SUSPICIOUS = {\n    \"block-scoped-var\": \"error\",\n    \"no-extend-native\": \"error\",\n    \"no-implied-eval\": \"error\",\n    \"no-unmodified-loop-condition\": \"error\",\n    \"no-shadow\": [\n        \"error\",\n        {\n            builtinGlobals: false,\n            hoist: \"all\",\n            ignoreFunctionTypeParameterNameValueShadow: false,\n            ignoreOnInitialization: false,\n            ignoreTypeValueShadow: false,\n        },\n    ],\n    \"no-unexpected-multiline\": \"error\",\n    \"no-unneeded-ternary\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_ESLINT = {\n    ...RULES_ESLINT_NURSERY,\n    ...RULES_ESLINT_PEDANTIC,\n    ...RULES_ESLINT_PERF,\n    ...RULES_ESLINT_RESTRICTION,\n    ...RULES_ESLINT_STYLE,\n    ...RULES_ESLINT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n    RULES_ESLINT,\n    RULES_ESLINT_NURSERY,\n    RULES_ESLINT_PEDANTIC,\n    RULES_ESLINT_PERF,\n    RULES_ESLINT_RESTRICTION,\n    RULES_ESLINT_STYLE,\n    RULES_ESLINT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,uBAAuB,EACzB,yBAAyB,QAC7B;AAEA,MAAM,wBAAwB;CAC1B,QAAQ,CACJ,SACA,QACJ;CACA,wBAAwB;CACxB,wBAAwB;CACxB,yBAAyB;CACzB,kBAAkB,CACd,SACA,EAC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