You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess I want something similar to what my IDE is doing.
Currently my IDE (WebStorm) shows a suggestion like that, but I guess thats WebStorm specific. And I can't run eslint --fix to do that:
Is that already possible with a eslint rule or is that a possible improvement to this package? (I guess it would fit into import/no-useless-path-segments)
The text was updated successfully, but these errors were encountered:
no-useless-path-segments can only check relative filesystem paths. There's no good way to be sure what aliases might be doing and how they can be altered in a reliable way, that I can think of.
WebStorm's suggestions could be made as eslint rule suggestions, but not as an autofix. Additionally, that'd be a rule option that only applied when using TS, so I'm not sure it's a good fit for this plugin.
Does the TS-eslint plugin not have a rule that can cover this?
Hey.
I am currently working on an nx project. Where in the tsconfig something like that is configured:
Then in the code somewhere in the project there is an import like:
Which could be shortened to
I guess I want something similar to what my IDE is doing.
![Screenshot 2024-05-14 at 13 03 43](https://private-user-images.githubusercontent.com/31982496/330398888-f71b3ceb-f626-4f9b-ba68-7c5ee2ffb9b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTU5MTksIm5iZiI6MTcyNTU5NTYxOSwicGF0aCI6Ii8zMTk4MjQ5Ni8zMzAzOTg4ODgtZjcxYjNjZWItZjYyNi00ZjliLWJhNjgtN2M1ZWUyZmZiOWIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA0MDY1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzN2U1MTQzNTlmNmE1ZTAzNTQ1ODMwZDUzMGM1N2ViY2Q5YTA0NjU1YjQ0Yzk3ZWVmZTNkYjA1M2Y5NmE0MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YL8_zCK9Bvy-VZGI8x-njFcAvfOhLhBlx8cPvaBS618)
Currently my IDE (WebStorm) shows a suggestion like that, but I guess thats WebStorm specific. And I can't run eslint --fix to do that:
Is that already possible with a eslint rule or is that a possible improvement to this package? (I guess it would fit into import/no-useless-path-segments)
The text was updated successfully, but these errors were encountered: