Giter VIP home page Giter VIP logo

Comments (7)

lydell avatar lydell commented on June 15, 2024

Hi! Can you provide steps to reproduce? Probably, the easiest thing is if you create a minimal reproduction repo that I can clone and run npm ci && npm test to reproduce.

from eslint-plugin-simple-import-sort.

dmurdasova avatar dmurdasova commented on June 15, 2024

Sure, there is a repo: https://github.com/dmurdasova/imports-error/tree/main

Please, pay attention, that I use pnpm instead of npm (not sure if it is important) and nx.

Before installing dependencies you need to run the "preinstall" script.
Then, install deps both in the root directory, and "libs/test" directory.

When you call the "lint" or the "lint:fix" script, you will get the same error: Screenshot 2023-11-23 at 13 45 15

from eslint-plugin-simple-import-sort.

lydell avatar lydell commented on June 15, 2024

Thanks! Can you reduce the repo down? Often when I report issues myself, I find the actual problem while doing so. It would be nice to get rid of nx, and as many unnecessary files as possible. If it still happens in a more minimal repo, I can take a look.

from eslint-plugin-simple-import-sort.

dmurdasova avatar dmurdasova commented on June 15, 2024

Did it, removed nx and other extra packages. But I still have this issue :(

Screenshot 2023-11-23 at 16 42 29

from eslint-plugin-simple-import-sort.

dmurdasova avatar dmurdasova commented on June 15, 2024

Node and pnpm versions:

Screenshot 2023-11-23 at 16 50 40

from eslint-plugin-simple-import-sort.

lydell avatar lydell commented on June 15, 2024

Awesome! I cloned your repo, but wasn’t able to reproduce your problem:

~/stuff/imports-error main
❯ npm run lint

> @[email protected] lint
> eslint "./**/*.{js,jsx,ts,tsx}"


/Users/simon/stuff/imports-error/libs/test/src/components/Block/Block.tsx
  1:1  error  Run autofix to sort these imports!  simple-import-sort/imports

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.


~/stuff/imports-error main
❯ npm run lint:fix

> @[email protected] lint:fix
> eslint --fix "./**/*.{js,jsx,ts,tsx}"


~/stuff/imports-error main !1
❯ npm run lint

> @[email protected] lint
> eslint "./**/*.{js,jsx,ts,tsx}"


~/stuff/imports-error main !1
❯ git diff
diff --git a/libs/test/src/components/Block/Block.tsx b/libs/test/src/components/Block/Block.tsx
index a4c69c6..1985a11 100644
--- a/libs/test/src/components/Block/Block.tsx
+++ b/libs/test/src/components/Block/Block.tsx
@@ -1,5 +1,6 @@
 import isEmpty from 'lodash/isEmpty';
 import React from 'react';
+
 import { Icon } from '../Icon';
 import { isValid } from './isValid';

from eslint-plugin-simple-import-sort.

dmurdasova avatar dmurdasova commented on June 15, 2024

Interesting! I'll try to get why I get errors.
Thank you for your time! :)

from eslint-plugin-simple-import-sort.

Related Issues (20)

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.