Comments (7)
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.
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:
from eslint-plugin-simple-import-sort.
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.
Did it, removed nx and other extra packages. But I still have this issue :(
from eslint-plugin-simple-import-sort.
Node and pnpm versions:
from eslint-plugin-simple-import-sort.
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.
Interesting! I'll try to get why I get errors.
Thank you for your time! :)
from eslint-plugin-simple-import-sort.
Related Issues (20)
- Question: how to approach the workaround for padding-line-between-statements? HOT 2
- Please update your docs HOT 2
- Named imports with `as` aren't sure where to go HOT 2
- Using without new lines between groups HOT 2
- Error with aliased imports and eslint-plugin-import HOT 1
- Support for namespace imports HOT 8
- Prepare for ESLint 9: Deprecated methods
- sorted import specifiers missing space HOT 2
- how to make side effect always be top HOT 2
- I thought library imports were supposed to come before relative imports? HOT 4
- Duplicate imports are not being removed HOT 1
- Conflict between eslint-plugin-simple-import-sort and esbenp.prettier-vscode HOT 2
- TypeError: parentNode.body is not iterable in v11 HOT 6
- Import in group despite not being matched by regex expression HOT 2
- What is the difference vs eslint-plugin-import HOT 1
- Add TypeScript types HOT 7
- Explore configuration with real regex instead of strings HOT 1
- Why add empty line bettween two react imports HOT 3
- Option to prevent sorting inside a group HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-simple-import-sort.