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
I recently wanted to migrate our eslint setup to use the new flat config (because it's the best :) ). Found your config in the perfect timing. We're building vite powered vue+ts app so most of your defaults suit us very well, but we have a couple opinionated rules that I'd like to modify. I was surprised that it was not as easy as I thought with the new flat config system for language scope rules.
Trying to override a TS rule to meet my requirements as such: 'ts/consistent-type-definitions': ['error', 'type'],
Running eslint throws this error:
It seems like you can get around by making to specify the files pattern to ensure eslint is able to validate against a config that has the rule. see in the repro:
This is not ideal and was hoping that I wouldn't have to do this. Here, I copy pasted the GLOB from your sources.
Suggested solution
I believe we're all fairly new and not super familiar yet with flat config, so I am not 100% sure it is expected from eslint perspective (let me know if not). Assuming yes, I'm thinking this repo could provide api/recipe to ease the process of overriding specific rules.
Thinking about 2 possible solutions:
allow to pass options in each tree-shaken config that will be merged
eg:
Clear and concise description of the problem
I recently wanted to migrate our eslint setup to use the new flat config (because it's the best :) ). Found your config in the perfect timing. We're building vite powered vue+ts app so most of your defaults suit us very well, but we have a couple opinionated rules that I'd like to modify. I was surprised that it was not as easy as I thought with the new flat config system for language scope rules.
Here's a minimal repro that is highlighting my problem:
https://stackblitz.com/edit/stackblitz-starters-bcd913?file=eslint.config.js
Trying to override a TS rule to meet my requirements as such:
'ts/consistent-type-definitions': ['error', 'type'],
Running eslint throws this error:
It seems like you can get around by making to specify the files pattern to ensure eslint is able to validate against a config that has the rule. see in the repro:
This is not ideal and was hoping that I wouldn't have to do this. Here, I copy pasted the GLOB from your sources.
Suggested solution
I believe we're all fairly new and not super familiar yet with flat config, so I am not 100% sure it is expected from eslint perspective (let me know if not). Assuming yes, I'm thinking this repo could provide api/recipe to ease the process of overriding specific rules.
Thinking about 2 possible solutions:
eg:
Alternative
No response
Additional context
ps: Thanks for your work. I'm a big fan of unocss, just started sponsoring you :)
Validations
The text was updated successfully, but these errors were encountered: