-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match non getters / setters methods #45
Comments
If you handle 'sort-class-members/sort-class-members': [
2,
{
accessorPairPositioning: 'getThenSet',
groups: {
'accessor-pairs': [
{ accessorPair: true },
],
methods: [
{
sort: 'alphabetical',
type: 'method',
},
],
properties: [
{
sort: 'alphabetical',
type: 'property',
},
],
'static-methods': [
{
sort: 'alphabetical',
static: true,
type: 'method',
},
],
'static-properties': [
{
sort: 'alphabetical',
static: true,
type: 'property',
},
],
},
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'constructor',
'[accessor-pairs]',
'[methods]',
],
},
], and this class: export abstract class Foo<T> {
protected abstract readonly _foo: T;
public readonly bar: string;
public readonly baz: string;
protected constructor(bar: string) {
this.bar = bar;
this.baz = bar.trim();
}
protected abstract parse(baz?: string): T;
protected abstract stringify(): string;
public abstract get zebra(): Foo<T>['_foo'];
public abstract set zebra(value: T);
} and you can see from my screenshot that even though |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Firstly, thanks for the awesome plugin 👍 .
My goal
I would like to sort public not static not constructor not accessor methods alphabetically in ES6 classes.
What I tried
How can I match methods that are not accessors in "groups" ?
I would like to set a configuration like that
to place this slot like that
But this only matches public non static non constructor methods, it still matches getters and setters.
Can i create such a group ? Or maybe I'm doing it wrong and there's a simpler way I don't find ?
The text was updated successfully, but these errors were encountered: