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
Hey, I have an issue that I get duplicate type-aware rules, when I'm using eslint's inspect config functionality. I was digging through the code and saw that here you are mutating a global list of rules.
From what I understand eslint inspect config reloads the configuration file, once it changes, so the same set of rules runs through this partitioning function and the same rules get added second time to this array. This also would happen if for example I use defineConfigWithVueTs twice while constructing my eslint.config.mjs. I think the proper solution would be to have that array as a local variable per call to defineConfigWithVueTs function.
Also, while we are on the topic of this partitioning functionality, I think it would be a good idea if the name of a rule that is being extracted would also be preserved. Otherwise I get a lot of anonymous rules, and I put some time and thought in naming all my rules.
Hey, I have an issue that I get duplicate type-aware rules, when I'm using eslint's inspect config functionality. I was digging through the code and saw that here you are mutating a global list of rules.
eslint-config-typescript/src/utilities.ts
Line 83 in d23d94c
From what I understand eslint inspect config reloads the configuration file, once it changes, so the same set of rules runs through this partitioning function and the same rules get added second time to this array. This also would happen if for example I use
defineConfigWithVueTs
twice while constructing myeslint.config.mjs
. I think the proper solution would be to have that array as a local variable per call todefineConfigWithVueTs
function.Also, while we are on the topic of this partitioning functionality, I think it would be a good idea if the name of a rule that is being extracted would also be preserved. Otherwise I get a lot of anonymous rules, and I put some time and thought in naming all my rules.
I suggest this object construction
eslint-config-typescript/src/utilities.ts
Lines 145 to 148 in d23d94c
The text was updated successfully, but these errors were encountered: