Open zaro0508 opened 3 years ago
we run cfn-lint as part of checks on PR.
copy over the scripts from here: https://github.com/org-formation/org-formation-reference/blob/master/package.json
and
"hooks": {
"pre-commit": "npm run print-tasks && npm run cfn-lint"
}
not sure whether the cli should ship with husky configs (tool/integration method is not a cli choice), but this way it should be easy to integrate. maybe we can add this to the https://github.com/org-formation/org-formation-reference
hmm, running linters manually or in CI is not the same as running on every local commit (git commit hook). I find the hook workflow to be better and much more convenient. Also i think would be in package.json devDependencies
so shouldn't ship with the cli, correct?
It would be nice to setup something like pre-commit so that we can setup multiple linters to validate files on every commit. It looks like there's lint-staged for the node environment. here's an example, https://juliangaramendy.dev/blog/prettier-pre-commit-hook