{"version":3,"file":"import.mjs","names":[],"sources":["../../../../src/presets/common/rules/import.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_IMPORT_CORRECTNESS = {\n    \"import/default\": \"error\",\n    \"import/namespace\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_NURSERY = {\n    \"import/export\": \"error\",\n    \"import/named\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_RESTRICTION = {\n    \"import/extensions\": [\n        \"error\",\n        \"always\",\n        {\n            // source\n            js: \"never\",\n            ts: \"never\",\n            mjs: \"never\",\n            mts: \"never\",\n            cjs: \"never\",\n            cts: \"never\",\n            jsx: \"never\",\n            tsx: \"never\",\n            // configurations\n            checkTypeImports: true,\n            ignorePackages: true,\n        },\n    ],\n    \"import/no-cycle\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_STYLE = {\n    \"import/consistent-type-specifier-style\": [\n        \"error\",\n        \"prefer-top-level\",\n    ],\n    \"import/first\": \"error\",\n    \"import/newline-after-import\": [\n        \"error\",\n        {\n            considerComments: true,\n            count: 1,\n            exactCount: true,\n        },\n    ],\n    \"import/no-duplicates\": [\n        \"error\",\n        {\n            considerQueryString: true,\n            preferInline: false,\n        },\n    ],\n    \"import/no-mutable-exports\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT_SUSPICIOUS = {\n    \"import/no-empty-named-blocks\": \"error\",\n    \"import/no-named-as-default\": \"error\",\n    \"import/no-self-import\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_IMPORT = {\n    ...RULES_IMPORT_CORRECTNESS,\n    ...RULES_IMPORT_NURSERY,\n    ...RULES_IMPORT_RESTRICTION,\n    ...RULES_IMPORT_STYLE,\n    ...RULES_IMPORT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n    RULES_IMPORT,\n    RULES_IMPORT_CORRECTNESS,\n    RULES_IMPORT_NURSERY,\n    RULES_IMPORT_RESTRICTION,\n    RULES_IMPORT_STYLE,\n    RULES_IMPORT_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,2BAA2B;CAC7B,kBAAkB;CAClB,oBAAoB;AACxB;AAEA,MAAM,uBAAuB;CACzB,iBAAiB;CACjB,gBAAgB;AACpB;AAEA,MAAM,2BAA2B;CAC7B,qBAAqB;EACjB;EACA;EACA;GAEI,IAAI;GACJ,IAAI;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GAEL,kBAAkB;GAClB,gBAAgB;EACpB;CACJ;CACA,mBAAmB;AACvB;AAEA,MAAM,qBAAqB;CACvB,0CAA0C,CACtC,SACA,kBACJ;CACA,gBAAgB;CAChB,+BAA+B,CAC3B,SACA;EACI,kBAAkB;EAClB,OAAO;EACP,YAAY;CAChB,CACJ;CACA,wBAAwB,CACpB,SACA;EACI,qBAAqB;EACrB,cAAc;CAClB,CACJ;CACA,6BAA6B;AACjC;AAEA,MAAM,0BAA0B;CAC5B,gCAAgC;CAChC,8BAA8B;CAC9B,yBAAyB;AAC7B;AAEA,MAAM,eAAe;CACjB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}