L
L
lexstile2021-11-30 11:17:24
Linter
lexstile, 2021-11-30 11:17:24

How to set property order for typing in eslint?

Can you please tell me if it is possible to adjust the order of object properties through eslint and how can this be done?
You need the following structure:

{
// обязательные свойства,
// необязательные свойства,
// обязательные свойства-функции,
// необязательные свойства-функции,
}

// или хотя бы:
{
// свойства,
// свойства-функции,
}

// example
// Есть такой объект типизации:
type Props = {
  currentUserId: string;
  label: string;
  onChange: (newValue?: string) => void;
  required?: boolean;
  value: string;
};

// Нужно такой:
type Props = {
  currentUserId: string;
  label: string;
  value: string;
  required?: boolean;
  onChange: (newValue?: string) => void;
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question