Comments (19)
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.
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.
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.
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.
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.
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.
Our new dependency on ember-eslint-parser could bring in some newer TypeScript dependencies. Could that be related?
from eslint-plugin-ember.
@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.
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.
it's possible your tsconfig resolution settings aren't expecting extensionless imports?
I'll dive in to your repro tomorrow
from eslint-plugin-ember.
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.
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:
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.
Relevant discord discussion: https://discord.com/channels/480462759797063690/717767358743183412/1206812615985336320
from eslint-plugin-ember.
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.
your lockfile needs refreshed -- it's using a very old parser
from eslint-plugin-ember.
@NullVoxPopuli it's not that. I pushed another commit that updates everything. Still doesn't work.
from eslint-plugin-ember.
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.
It's a bug in eslint-plugin-ember
. This doesn't allow 0.3.x
.
from eslint-plugin-ember.
PR to update here: #2091
from eslint-plugin-ember.
Related Issues (20)
- config files in readme should not encourage top level config. overrides only.
- ESLint couldn't find the config "plugin:ember/gts-recommended" to extend from HOT 4
- false positives for `no-unused-vars` in `gjs` files, when using `<Component as |something|>` HOT 3
- gjs/gts Incorrect token mapping after handlebars HOT 1
- Support "Type aware" linting for gts files HOT 13
- "service" import not treated the same as "inject as service" HOT 1
- no-unused-expressions HOT 4
- Plan v13 Release HOT 4
- new "flat" configs contain invalid parser key HOT 19
- ember/template-no-let-reference HOT 4
- ember/no-runloop HOT 4
- New rule: prevent assignment of existing properties on a service (important for tests)
- @typescript-eslint/eslint-recommended not applicable to `*.gts` files HOT 1
- Should we provide a config that disables some rules from `@typescript-eslint/eslint-plugin`? HOT 11
- no-unused-vars firing incorrectly on args inside template-tag HOT 7
- Lint against shadowed keywords
- eslint v9 support
- `no-pause-test` rule doesn't work for test files with `.gts` or `.gjs` extension HOT 5
- `ember/no-runloop` brings false positive error with function name `hasOwnProperty` HOT 2
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-ember.