I'd like a way to run all my eslint
through betterer
#1198
Replies: 3 comments
-
So it's not really a hard rule, but philsophically I think it's best if the core published |
Beta Was this translation helpful? Give feedback.
-
I hate it when a sensible philosophy runs into senseless reality. 🙂 I can get what I want just by |
Beta Was this translation helpful? Give feedback.
-
Actually I have a different approach here; I'm going to
That way I can keep all my Lmk if you have any interest in adopting the |
Beta Was this translation helpful? Give feedback.
-
Right now in
betterer
(5.x) the only way to runeslint
iseslint
config files that apply only when runningeslint
outside ofbetterer
betterer
config files that apply only when runningeslint
insidebetterer
because the current implementation of
@beterrer/eslint
replaces the ruleset fromeslint
with a ruleset consisting only ofbetterer
eslint
rules (and turns off all other rules in theeslint
config).The problem with this is that
eslint
andbetterer
@typescript-eslint
rules that rely on type information,eslint
has high startup cost (about 20s in my project) because it rebuild all the type information on any invocation — even if runningeslint
on a single file (for example, inpre-commit
mode, it still takes 20s to rebuild all the typing information)… this is a known issue witheslint
/TypeScript, and as far as I am aware there is some work ineslint
to address it, but it's nowhere near readyeslint
inpre-commit
I end up with a 20s delay (which is already painful) but if I run botheslint
andbetterer
, I end up with a 40s delay (which my team will not put up with). I could potentially consider runningeslint
andbetterer
in parallel, but that has other issues (mainly with memory utilization, which then leads to its own set of performance problems).What I would really like to do here is just… let all my existing
eslint
rules pass throughbetterer
, and then have some additional rules inbetterer
config that I am adopting incrementally. This works fine, I think, because for rules that I have already fully adopted, I am going to have zero errors, so abetterer
rule with asmaller
constraint will keep them at zero, which is what I want.So, what I would like is an option to
@betterer/eslint
that lets me say "run all existing rules plus the ones I passed you in" rather than "disable all existing rules and only use the ones I passed you in".I'd be willing to contribute a PR for this if you think it's a useful idea.
Beta Was this translation helpful? Give feedback.
All reactions