Skip to content
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

Type sorting does not work correctly #54

Open
serGlazkov opened this issue Feb 8, 2023 · 0 comments
Open

Type sorting does not work correctly #54

serGlazkov opened this issue Feb 8, 2023 · 0 comments

Comments

@serGlazkov
Copy link

The section with type imports looks wrong
My config is:

'import-helpers/order-imports': [
  'error',
  {
    newlinesBetween: 'always', // new line between groups
    groups: [
      ['/^react$/', '/^next/', 'module'],
      ['/^@framework/', '/^@lib/'],
      '/^@contexts/',
      '/^@components/',
      ['parent', 'sibling', 'index'],
      'type',
    ],
    alphabetize: { order: 'asc', ignoreCase: true },
  },
],

The sorting result looks like this:

import { AnimatePresence, motion } from 'framer-motion'
import { useTranslation } from 'next-i18next'
import Link from 'next/link'
import { useToggle } from 'react-use'

import {
  useTrackIdentifyCustomer,
  useTrackLogin,
  useTrackRegistration,
} from '@lib/tracking/helper'

import { useAuthContext } from '@contexts/AuthContext/AuthContext'

import { Button, Logo } from '@components/ui'

import { AuthFormInput } from './AuthFormInput'
import { getFormData } from './get-form-data'
import { hasErrors } from './has-errors'

import type { AuthFormData, AuthFormErrors } from './useFormValidation'
import { useFormValidation } from './useFormValidation'
import { useCallback, useEffect, useState } from 'react'
import type { FC, FormEvent, HTMLAttributes } from 'react'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant