What’s the process for setting up a linter and formatter in a code repository (typescript)? I would like a solution that invalidates commits or pull requests before they are merged.
There are some functions which enable linting before committing here:
https://www.palantir.com/docs/foundry/transforms-python/unit-tests#enabling-spark-anti-pattern-plugin
I recall there used to be one in the default gradle.build that did basic linting, not just the spark anti-pattern.
// Apply the linting plugins
apply plugin: 'com.palantir.conda.pep8'
apply plugin: 'com.palantir.conda.pylint
’
The problem with this is that it run’s on commit instead of on PR, and will prevent checks from succeeding. I’m not aware of any ways run hooks on PR only, though they may exist.
Out installation does have a auto-linter that runs before commit, so that in combination with those plugins might get you where you want to go without too much pain.
I just realized that you are looking for TypeScript, my comments probably aren’t relevant for that, sorry!
Thanks @devonyates , I’m hoping for some parity between the typescript and python repositories. For instance, python repos have a checkbox under the commit text box for formatting before committing. Looking to see how to mimic similar behavior in typescript repos.