I would say this might differ depending on the context.
How "big" is a typical feature and a feature branch? Assume each feature, and changes in feature branches tend to be relatively small, so that merges into the main branch occur frequently. In that case I would be tempted to consider a feature branch almost a "personal" branch, belonging to whoever is working on it. As such, I think it should be up the that developer to decide whether or not it should be tested on every commit.
If a feature branch is a larger beast, and several developers are working on it over time, then I would agree that linting / testing on each commit would be very useful. In this case however, each dev may well have his or her own personal branch in addition to the common feature branch, and I would not want to enforce testing / linting on those.
Why not? Because on principle I would not want to force any restrictions on developers that early in the coding process. Later, when merging to the feature branch? Sure. When merging to the main branch? Definitely! Still I don't see why a dev shouldn`t be able to commit whatever he or she wants to his or her own branch.
In my personal experience, I try to avoid committing code that is not ready (i.e. no broken builds, no failing tests, etc), but we all know that in real life, there are some systems that are large, complicated, and sub-optimally designed, and that occasionally need some major refactoring. Sometimes it can be useful to perform such refactoring in more than a single step, and this may result in two or more commits, between which the system is not in a functioning state. I would still like to be able to commit my changes though, and to push them to my personal branch. I would also like for a copy of that branch to reside on the server as a backup, even though I don't expect anyone else to need access to it.
Once all my refactoring is complete and pushed to my branch, I might squash all my commits and commit it to the main branch, some other feature branch. At this point I would be fine with any testing / linting rules that blocked my commit if I'd made a mistake, or if the overall system didn't build. For my own personal branch though, I would prefer to avoid that.