DISCLAIMER
All credits to @azat-io, as this code is a modification from his implementation of
eslint-plugin-perfectionistSvelte property sorting was discontinued after v4 of
eslint-plugin-importand a solution insideeslint-plugin-sveltedoes not fulfill my needs aseslint-plugin-perfectionistdid
With your package manager:
bun add -d eslint-plugin-svelte-sort-attributes
In your flat eslint config:
import svelteSortAttributes from 'eslint-plugin-svelte-sort-attributes';
export default [
  {
    plugins: { 'svelte-sort-attributes': svelteSortAttributes },
    rules: {
      'svelte-sort-attributes/sort-attributes': [
        'error',
        { type: 'natural', order: 'asc' }
      ],
    },
  },
]
In your legacy eslint config:
module.exports = {
  plugins: [ 'svelte-sort-attributes' ],
  rules: {
    'svelte-sort-attributes/sort-attributes': [
      'error',
      { type: 'natural', order: 'asc' }
    ]
  }
}