-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desired outcome: candidate rules are tested on some actual code prior to their addition #1841
Comments
Nope, that's not the point. The point is that the rules I don't agree with are usually highly contested among many other tyescript-eslint users/developers. That lead me to think that these rules simply didn't have enough real world testing done before being published in a stable recommended config. I have many other rules I don't agree with (like the lack of trailing commas which make git rebases more difficult and error prone) but they are not fundamentally broken and I can either live with them or disable them.
I'm hundred percent sure about that. It's just a matter of enabling a new rule in a big enough codebase and spending half an hour going through all the occurrences to notice if it does more harm than good.
My biggest fear is that the audience for a "testing" version of this package might not be big enough to catch issues within a small timeframe. Projects with top notch CI/CD which include renovate among other things could potentially catch these issues early on, but chances are they would probably skip testing versions altogether. Where renovate isn't in charge of updating dependencies I usually skip several versions between each upgrade, so a testing version wouldn't help either. Increasing the testing time would block stable releases, which should still occur for rules that are deemed safe. What could help is configs IMO. The codebase sticks to the recommended config where you are 100% sure that either of the following is true:
This is especially important if you have git hooks that force everybody to adhere to the linting rules in order to commit. |
This config doesn't go into formatting at all for that matter. Aren't you using a formatter in conjunction with this config? I wouldn't expect users to participate in testing an experimental configuration. While you seem upset about the release of controversial rules, the release of controversial rules may actually be a practical strategy. Early adopters provide feedback, rules are sometimes adjusted, progress is made. Would this be the cause of embarrassment among "supporters" of this config within teams? |
Oh my bad, I use it in conjuction with eslint-prettier and I vaguely remembered that eslint-config-standard-with-typescript did have some formatting rules but I'm probably mistaken.
Most won't, but those who care about esling-config-love not breaking their application will have a peak from time to time. Being able to stage changes for as long as months will make sure that some real world testing will be eventually done.
The problem with this approach is that almost each and every release is a major release and these tend to happen very frequently. If major bumps were reserved for potentially controversial changes and happened only every couple of months this could have worked.
It actually is unfortunately. Reality is that if I give the team freedom to update eslint-config-love I risk either finding the app full of shit or having to stop doing whatever I'm doing to assess the problem and revert the rules. This is not what I envision for eslint-config-love: it should be a collection of established best practices and as such it should be viable even for someone who cannot discern between good rules and bad rules. If we allow it to be a testing ground those who use it to learn will have a very bad time. |
It did: #1572
The way versioning works is documented in the readme:
Yeah, okay. I share this vision of it being "established". Or at least thought of and tested to a reasonable degree. But to help users who lack discernment, I don't currently have good ideas. The readme says:
Users need to have discernment for this. Not to mention the rest of the engineering they are generally tasked to perform. |
I'm fine with that, but it should be limited to some. Several rules are doing more harm than good recently IMO.
Good luck having someone who just started learning Typescript being able to discern things that sometimes are hard even for experienced developers (example: the implications of not assigning a variable in Typescript). Typescript is hard, there is no way around it. Sometimes I give up because things are too hard to implement and tend to break between major versions of Typescript. I cannot blame someone who just started, they need to get all the help that we can provide from good tooling. |
I agree with @darkbasic on having a bleeding edge config and a recommended config that is trailing behind. |
If you really want this, I have some questions about it. But I don't want to reuse this particular issue. |
@darkbasic I've had this in mind for a while. I think that even the least automated workflow might be reasonable, especially in cases where the impact of the rule is not clear. But for all new rules such a workflow would shed light on impact, which is a benefit. But considering how much time I spend on this project, I might be more inclined to test only for some rules.
If you or anyone wishes to help, then please pour your thoughts in here. Perhaps design a tool. Perhaps find an existing one.
The text was updated successfully, but these errors were encountered: