GithubHelp home page GithubHelp logo

Comments (7)

artaommahe avatar artaommahe commented on September 13, 2024 1

using import type helps, but it requires to do this manually. By default vscode add auto-imports without type. It's not a good idea to force developers manually check imports list and add type to random places (and frequently imports list is just collapsed by default).

from eslint-plugin-import.

Pespiri avatar Pespiri commented on September 13, 2024 1

This "rule change" seems to be very inconsistent, as it seems to only trigger on external dependencies, at least in our project.
Any internal types and interfaces imported as "import { SomeType } from "./someInterface"" are not affected.
image

We would very much like to keep using our old importing style, and would appreciate if this, if not a bug, could be configured.
This issue seems to happen after upgrading "eslint-module-utils" to version"2.9.0" or above.
Our temporary solution has been to pin both "eslint-module-utils" and "eslint-plugin-import" to "2.8.2" and "2.29.0" respectively.

from eslint-plugin-import.

artaommahe avatar artaommahe commented on September 13, 2024 1

@ljharb [email protected]

from eslint-plugin-import.

ljharb avatar ljharb commented on September 13, 2024

if they're types, is there a reason you can't use import type?

from eslint-plugin-import.

ljharb avatar ljharb commented on September 13, 2024

I agree, and we do need a lint rule for that (#2390).

In the meantime, let's figure this out. Can you confirm you're using the latest version of the TS resolver?

from eslint-plugin-import.

artaommahe avatar artaommahe commented on September 13, 2024

@ljharb what's ts resolver?) just in case "typescript": "5.5.4",

from eslint-plugin-import.

ljharb avatar ljharb commented on September 13, 2024

@artaommahe eslint-import-resolver-typescript - it’s required to be able to lint typescript files properly with this plugin; see the readme.

from eslint-plugin-import.

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.