Groups and sorts your JavaScript imports when running prettier.
import React from 'react';
import classNames from 'classnames';
import styles from './Form.scss';
import Button from '@/components/common/Button';
import { arrChunk } from '@/helpers/functions';
//------------------------------------------------------------------------------
// Node Modules ----------------------------------------------------------------
import classNames from 'classnames';
import React from 'react';
//------------------------------------------------------------------------------
// Style -----------------------------------------------------------------------
import styles from './Form.scss';
//------------------------------------------------------------------------------
// Components ------------------------------------------------------------------
import Button from '@/components/common/Button';
//------------------------------------------------------------------------------
// Helpers ---------------------------------------------------------------------
import { arrChunk } from '@/helpers/functions';
Install yarn. Then run:
> yarn add -D prettier-plugin-pretty-imports
Prettier should automatically recognize the plugin in your project. Read more about prettier plugins here.