brandongregoryscott / eslint-plugin-collation

ESLint plugin for making your code easier to read, with autofix and TypeScript support
https://eslint-plugin-collation.brandonscott.me
Apache License 2.0
4 stars 0 forks source link

Update alphabetize-interfaces rule to also alphabetize nested objects #24

Closed brandongregoryscott closed 2 years ago

brandongregoryscott commented 2 years ago

Update the alphabetize-interfaces rule to alphabetize nested objects in an interface definition i.e.

interface Release {
    assets: any[];
    author: {
        login: string;
        id: number;
        avatar_url: string;
        gravatar_id: string;
        type: string;
        site_admin: boolean;
    };
    html_url: string;
    name: string;
    id: number;
    zipball_url: string;
}

will be transformed to:

interface Release {
    assets: any[];
    author: {
        avatar_url: string;
        gravatar_id: string;
        id: number;
        login: string;
        site_admin: boolean;
        type: string;
    };
    html_url: string;
    id: number;
    name: string;
    zipball_url: string;
}
brandongregoryscott commented 2 years ago

This is somewhat doubling as a bug. The routes.ts file in beets is failing to save properly because it is writing out duplicated properties.