import { defineConfig } from "oxlint"; export const perfectionist = defineConfig({ overrides: [ { files: ["**/*.{js,ts,jsx,cjs,mjs,tsx}"], jsPlugins: ["eslint-plugin-perfectionist"], rules: { "perfectionist/sort-jsx-props": ["warn", { customGroups: [{ elementNamePattern: "^on.+", groupName: "callback" }], groups: [ "shorthand-prop", "multiline-prop", "callback" ], ignoreCase: true }] } }, { files: ["**/*.{js,ts,jsx,cjs,mjs,tsx}"], jsPlugins: ["eslint-plugin-perfectionist"], rules: { "perfectionist/sort-imports": [ "warn", { groups: [ "side_effect", "builtin", "external", "internal", ["parent", "sibling", "index"], "style", "type-external", "type-internal", ["type-parent", "type-sibling", "type-index"], "side_effect-style", "unknown" ], internalPattern: [ "^(?!node:).*:.*$", "^(?!node:).*:.*\\/.*$", "^(?!node:).*:.*(?:\\/.*)*$", "^#.*$" ] } ], "perfectionist/sort-named-imports": [ "warn", { ignoreCase: true, order: "asc", type: "alphabetical" } ], // exports "perfectionist/sort-exports": [ "warn", { ignoreCase: true, order: "asc", type: "alphabetical" } ], "perfectionist/sort-named-exports": [ "warn", { ignoreCase: true, order: "asc", type: "alphabetical" } ], "perfectionist/sort-enums": [ "warn", { ignoreCase: true, order: "asc", type: "alphabetical" } ], "perfectionist/sort-interfaces": [ "warn", { groups: [ "required-index-signature", "required-property", "required-member", "required-method", "optional-index-signature", "optional-property", "optional-member", "optional-method" ], ignoreCase: true, order: "asc", partitionByNewLine: false, type: "alphabetical" } ], "perfectionist/sort-intersection-types": [ "warn", { groups: [ "union", "conditional", "function", "intersection", "literal", "operator", "named", "keyword", "nullish", "object" ], ignoreCase: true, order: "asc", type: "alphabetical" } ], "perfectionist/sort-object-types": [ "warn", { groups: [ "required-index-signature", "required-property", "required-member", "required-method", "optional-index-signature", "optional-property", "optional-member", "optional-method" ], ignoreCase: true, order: "asc", partitionByNewLine: true, type: "alphabetical" } ], "perfectionist/sort-union-types": [ "warn", { groups: [ "union", "conditional", "function", "intersection", "literal", "operator", "named", "keyword", "nullish", "object" ], ignoreCase: true, order: "asc", type: "alphabetical" } ] } } ] });