Skip to content

How can I set order for import './index.styl' #35

Open
@lupenq

Description

@lupenq

I know that the documentation has a clause about such imports, but can there still be some way?
I just want the style imports to always be at the bottom of everyone else

ex. imports:

import React, { useState } from 'react'
import { Image } from 'react-native'
import { observer, useDidUpdate } from 'startupjs'
import PropTypes from 'prop-types'
import randomcolor from 'randomcolor'
import Div from './../Div'
import Span from '../typography/Span'
import './index.styl'

my config:

    "import-helpers/order-imports": [
            "warn",
              { 
                "newlinesBetween": "ignore",
                "groups": [
                    "/^react$/",
                    "/react-native/",
                    "/^react.*/",
                    "/^startupjs/", 
                    "/^@?startupjs.*/",
                    "/^@?dmapper.*/",
                    "module",
                    "/components/",
                    ["/helpers/", "/hooks/"],
                    ["sibling", "parent"],
                    "/.\/index.styl/"
                ]
              }
        ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions