studiobakers / eslint-config-base

Bakers Studio's base ESLint rules
0 stars 0 forks source link

Order of webp files raises errors #28

Closed edizcelik closed 1 year ago

edizcelik commented 2 years ago

We started using webp files for some images on Tinyman and the ordering below gives an error:

import compensationBackgroundSrc from "../core/ui/images/CompensationBackground.webp";

import "./_v1-page.scss";

import {Navigate, Route, Routes} from "react-router-dom";
import {Suspense} from "react";

import Page from "../component/page/Page";
import PageContent from "../component/page/content/PageContent";
import ROUTES from "../core/route/routes";
import Loading from "../component/loading/Loading";
import lazyWithRetry from "../core/lazyWithRetry";
import ErrorBoundary from "../core/ErrorBoundary";

../core/ui/images/CompensationBackground.webp import should occur after import of react eslintimport/order

edizcelik commented 2 years ago

I think including webp under this pattern would solve it https://github.com/Hipo/eslint-config-hipo-base/blob/master/es2015.js#L120