Eslint-plugin-import: Support css imports for import/order

Created on 9 Apr 2018  路  1Comment  路  Source: benmosher/eslint-plugin-import

I really like the --fix option for import order, and it works most of the time. However, if I have something like

import React from "react"
import "./style.css"
import { forEach } from "lodash"

then the --fix option does not work

imporexport ordering question

Most helpful comment

It's not because it's a CSS import, it's because it's a side-effecting import - ie, it doesn't import a value. It's not safe for the autofixer to reorder side-effecting imports; you'll have to do that manually.

>All comments

It's not because it's a CSS import, it's because it's a side-effecting import - ie, it doesn't import a value. It's not safe for the autofixer to reorder side-effecting imports; you'll have to do that manually.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndrewLeedham picture AndrewLeedham  路  3Comments

gaearon picture gaearon  路  3Comments

pcorpet picture pcorpet  路  3Comments

daltonamitchell picture daltonamitchell  路  3Comments

segmentationfaulter picture segmentationfaulter  路  4Comments