Giter VIP home page Giter VIP logo

Comments (19)

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

in V11, type-aware lint rules were not able to run on gts files, now they are -- are you seeing something outside of the expected behavior from @typescript-eslint/no-redundant-type-constituents?

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

I should have mentioned that I'm not using GTS files yet, still on the "old" Ember style (but on the latest version).

Yes, all of these new errors that I get are bogus - they don't make sense. At least I think so.

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

Any chance you could create a reproduction repo?
I'm curious why, if you aren't using gts, why typescript-eslint rules are active at all?

Can you provide your config?

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

I'm using TS, why wouldn't they be active? I'm just not using GTS.

My config is pretty big. If you can't think of anything on the top of your head what might be happening, I'll try creating a reproduction shortly.

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

Are you importing from gjs? perhaps?

but yeah, a reproduction would be most helpful, as I don't have an ideas for anything that would cause the behavior you're seeing

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

No, I don't have any GTS in my code (and I guess I don't have in my plugins either?).

from eslint-plugin-ember.

bmish avatar bmish commented on May 28, 2024

Our new dependency on ember-eslint-parser could bring in some newer TypeScript dependencies. Could that be related?

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

@bmish it could be, however, I'm on the newest version of everything so... not sure.

Here is a repo. Clone and run pnpm lint:js. You'll see the error. Funny thing is that downgrading doesn't seem to fix it... it does on my project. And the minified version of my project that I was trying while reproducing...

If anyone has ideas... for me there is something very strange going on.

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

No, wait. This error seems to appear if the import is not found. If you change ../store to asdf/services/store it will fail in that way. In my project the Ember app is in a folder called frontend and all my imports are like frontend/services/store. Could this have somehow changed?

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

it's possible your tsconfig resolution settings aren't expecting extensionless imports?

I'll dive in to your repro tomorrow

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

I believe my tsconfig should be fine but I can't be sure. In any case, please check out the reproduction. Run pnpm i and then pnpm lint:js. You'll see the error. Downgrading to 11.12.0 fixes the issue.

from eslint-plugin-ember.

chancancode avatar chancancode commented on May 28, 2024

I have also attempted to upgrade and ran into the same issue. I attempted to make sure everything @typescript-eslint is already up-to-date before the eslint-plugin-ember upgrade itself to isolate the issue as much as possible.

Here is the upgrade diff: https://gist.github.com/chancancode/966bf0ff4df59c919839113f368b1a7a

I also tried deleting the eslint cache (before/after the upgrade) just to be sure, but doesn't seem to be the case either.

It definitely seems like something about this upgrade broke something in the module graph, either things are not resolving, or some module isn't able to be parsed correctly, and causing that to cascade outwards.

It's causing non-ember related errors like these:

Screen Shot 2024-02-12 at 7 50 30 PM

Here, this.modelFor() has a return type of unknown so the only reason eslint complains about any would be because the AppComponent import failed to resolve and became any.

I have a pretty strong hunch that the problem is we somehow broke support for import type, and that they are silently getting ignored (the errors are as if you comment out all the import type lines).

from eslint-plugin-ember.

bmish avatar bmish commented on May 28, 2024

Relevant discord discussion: https://discord.com/channels/480462759797063690/717767358743183412/1206812615985336320

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

Thank you for working on this!

However, the new version (12.0.1) doesn't seem to fix either the problem in my repo, or the reproduction I gave above. Can someone check?

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

your lockfile needs refreshed -- it's using a very old parser

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

@NullVoxPopuli it's not that. I pushed another commit that updates everything. Still doesn't work.

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

your lockfile is still using too old of a parser: https://github.com/boris-petrov/eslint-plugin-ember-bug/blob/master/pnpm-lock.yaml#L790

should be 0.3.4.

make sure pnpm is > 8.7 so you get resolution-mode=highest set by default.

if that is the case, then we probably need to force a bump in eslint-plugin-ember.
.. we should probably do that anyway, really

from eslint-plugin-ember.

boris-petrov avatar boris-petrov commented on May 28, 2024

It's a bug in eslint-plugin-ember. This doesn't allow 0.3.x.

from eslint-plugin-ember.

NullVoxPopuli avatar NullVoxPopuli commented on May 28, 2024

PR to update here: #2091

from eslint-plugin-ember.

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.