Giter Site home page Giter Site logo

eslint-plugin-import-svg-order-example's Introduction

ESLint plugin import problem

This repository has been created to reproduce issue Import/order with .svg file patterns with eslint-plugin-import.

I want that in src/Root.tsx the svg files will be group and will import last.

Setup

Run yarn to install dependencies and after that yarn lint to lint the files.

Reproducing

  • Navigate to src/Root.tsx and change the import order like in the expected block.
  • Run yarn lint. If this issue will resolve - you should not get an error.

NOTE: you can configure it wherever you want, I just want to order my import in a way that .svg file imports will be after everything else (beside css files).

Expected:

  import React, { useState } from "react";
 
  import aImg from "../assets/a.jpg";
  import zImg from "../assets/z.jpg";
 
  import svgImage from "../assets/undraw_Taken_re_yn20.svg";
 
  import "./Root.css";
 

Actual:

import React, { useState } from "react";

import aImg from "../assets/a.jpg";
import svgImage from "../assets/undraw_Taken_re_yn20.svg";
import zImg from "../assets/z.jpg";
import "./Root.css";

eslint-plugin-import-svg-order-example's People

Contributors

nirtamir2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.