fix(types): fix types of flat configs#3882
Conversation
|
@ljharb Since #3879 is blocked, I tried to fix the typing issue from a different angle: creating a new flatConfigs object outside of the original If we run out of ideas on #3879, maybe we can go with this one? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3882 +/- ##
==========================================
+ Coverage 97.66% 97.71% +0.04%
==========================================
Files 136 133 -3
Lines 9978 9971 -7
Branches 3703 3703
==========================================
- Hits 9745 9743 -2
+ Misses 233 228 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I agree this is semver-minor, but I have no desire to go with that model. I want a single configs object with eslintrc configs, and a |
Yeah you are right, I just checked and found out ESLint supports And just curious, you are also the main maintainer of eslint-plugin-import and eslint-plugin-jsx-a11y, why is this plugin choosing this layout while the other two using the layout similar to the PR? TBH this is the only plugin among the few popular ones I used that use this layout, others either have flatConfigs as a separate object, or have the flat configs in the same level as the legacy configs (all inside the same configs object) and prefix the name with |
|
It's a fair point that they're not all the same; this, however, is what i would have preferred to do on the other two, i just didn't notice the difference. Prefixing means you can't programmatically compare them, for example - munging string names isn't clean at all. A separate object, at least, is more reasonable, but |
Fixes #3878
This is another attempt to fix #3878 from a different direction than #3879